cache responsibilities are limited to: 1. Computing keys for objects via keyFunc 2. Invoking methods of a ThreadSafeStorage interface
| 110 | // 1. Computing keys for objects via keyFunc |
| 111 | // 2. Invoking methods of a ThreadSafeStorage interface |
| 112 | type cache struct { |
| 113 | // cacheStorage bears the burden of thread safety for the cache |
| 114 | cacheStorage ThreadSafeStore |
| 115 | // keyFunc is used to make the key for objects stored in and retrieved from items, and |
| 116 | // should be deterministic. |
| 117 | keyFunc KeyFunc |
| 118 | } |
| 119 | |
| 120 | var _ Store = &cache{} |
| 121 |
nothing calls this directly
no outgoing calls
no test coverage detected