GetByKey returns the item stored under the key, or sets exists=false.
(key string)
| 107 | |
| 108 | // GetByKey returns the item stored under the key, or sets exists=false. |
| 109 | func (c *ExpirationCache) GetByKey(key string) (interface{}, bool, error) { |
| 110 | obj, exists := c.getOrExpire(key) |
| 111 | return obj, exists, nil |
| 112 | } |
| 113 | |
| 114 | // Get returns unexpired items. It purges the cache of expired items in the |
| 115 | // process. |
nothing calls this directly
no test coverage detected