NewStore returns a Store implemented simply with a map and a lock.
(keyFunc KeyFunc)
| 229 | |
| 230 | // NewStore returns a Store implemented simply with a map and a lock. |
| 231 | func NewStore(keyFunc KeyFunc) Store { |
| 232 | return &cache{ |
| 233 | cacheStorage: NewThreadSafeStore(Indexers{}, Indices{}), |
| 234 | keyFunc: keyFunc, |
| 235 | } |
| 236 | } |
| 237 | |
| 238 | // NewIndexer returns an Indexer implemented simply with a map and a lock. |
| 239 | func NewIndexer(keyFunc KeyFunc, indexers Indexers) Indexer { |