Get cache value
(ctx context.Context, id uint64)
| 81 | |
| 82 | // Get cache value |
| 83 | func (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 |
| 94 | func (c *userExampleCache) MultiSet(ctx context.Context, data []*model.UserExample, duration time.Duration) error { |
nothing calls this directly
no test coverage detected