MCPcopy Index your code
hub / github.com/go-dev-frame/sponge / Get

Method Get

internal/cache/userExample.go:83–91  ·  view source on GitHub ↗

Get cache value

(ctx context.Context, id uint64)

Source from the content-addressed store, hash-verified

81
82// Get cache value
83func (c *userExampleCache) Get(ctx context.Context, id uint64) (*model.UserExample, error) {
84 var data *model.UserExample
85 cacheKey := c.GetUserExampleCacheKey(id)
86 err := c.cache.Get(ctx, cacheKey, &data)
87 if err != nil {
88 return nil, err
89 }
90 return data, nil
91}
92
93// MultiSet multiple set cache
94func (c *userExampleCache) MultiSet(ctx context.Context, data []*model.UserExample, duration time.Duration) error {

Callers

nothing calls this directly

Calls 2

GetMethod · 0.65

Tested by

no test coverage detected