Fetch gets keys from the cache. The keys that are found must be in the order of the keys requested.
(ctx context.Context, keys []string)
| 133 | |
| 134 | // Fetch gets keys from the cache. The keys that are found must be in the order of the keys requested. |
| 135 | func (c *Memcached) Fetch(ctx context.Context, keys []string) (found []string, bufs [][]byte, missed []string) { |
| 136 | if c.cfg.BatchSize == 0 { |
| 137 | found, bufs, missed = c.fetch(ctx, keys) |
| 138 | return |
| 139 | } |
| 140 | _ = instr.CollectedRequest(ctx, "Memcache.GetBatched", c.requestDuration, memcacheStatusCode, func(ctx context.Context) error { |
| 141 | found, bufs, missed = c.fetchKeysBatched(ctx, keys) |
| 142 | return nil |
| 143 | }) |
| 144 | return |
| 145 | } |
| 146 | |
| 147 | func (c *Memcached) fetch(ctx context.Context, keys []string) (found []string, bufs [][]byte, missed []string) { |
| 148 | var items map[string]*memcache.Item |
nothing calls this directly
no test coverage detected