Cache is a barebones cache implementation.
| 8 | |
| 9 | // Cache is a barebones cache implementation. |
| 10 | type Cache struct { |
| 11 | // capacity and length have to be the first words |
| 12 | // in order to be 64-aligned on 32-bit architectures. |
| 13 | capacity, length uint64 // access atomically |
| 14 | entries sync.Map |
| 15 | pool sync.Pool |
| 16 | } |
| 17 | |
| 18 | // CacheEntry represents an entry on the cache. You can type assert on V. |
| 19 | type CacheEntry struct { |
nothing calls this directly
no outgoing calls
no test coverage detected