Get looks up a key's value from the cache.
(key interface{})
| 247 | |
| 248 | // Get looks up a key's value from the cache. |
| 249 | func (bc *baseCache) Get(key interface{}) (value interface{}, ok bool) { |
| 250 | if e := bc.store.get(key); e != nil { |
| 251 | bc.access(e) |
| 252 | return e.Value, true |
| 253 | } |
| 254 | return nil, false |
| 255 | } |
| 256 | |
| 257 | // StealthyGet looks up a key's value from the cache but does not consider it an |
| 258 | // "access" (with respect to the policy). |