(key string)
| 332 | } |
| 333 | |
| 334 | func (g *Group) lookupCache(key string) (value ByteView, ok bool) { |
| 335 | if g.cacheBytes <= 0 { |
| 336 | return |
| 337 | } |
| 338 | value, ok = g.mainCache.get(key) |
| 339 | if ok { |
| 340 | return |
| 341 | } |
| 342 | value, ok = g.hotCache.get(key) |
| 343 | return |
| 344 | } |
| 345 | |
| 346 | func (g *Group) populateCache(key string, value ByteView, cache *cache) { |
| 347 | if g.cacheBytes <= 0 { |