MCPcopy Create free account
hub / github.com/go-dev-frame/sponge / MultiSet

Method MultiSet

pkg/cache/memory.go:198–207  ·  view source on GitHub ↗

MultiSet multiple set data

(ctx context.Context, valueMap map[string]interface{}, expiration time.Duration)

Source from the content-addressed store, hash-verified

196
197// MultiSet multiple set data
198func (m *memoryCache) MultiSet(ctx context.Context, valueMap map[string]interface{}, expiration time.Duration) error {
199 var err error
200 for key, value := range valueMap {
201 err = m.Set(ctx, key, value, expiration)
202 if err != nil {
203 return err
204 }
205 }
206 return nil
207}
208
209// MultiGet multiple get data
210func (m *memoryCache) MultiGet(ctx context.Context, keys []string, value interface{}) error {

Callers

nothing calls this directly

Calls 1

SetMethod · 0.95

Tested by

no test coverage detected