NewIndexer returns an Indexer implemented simply with a map and a lock.
(keyFunc KeyFunc, indexers Indexers)
| 237 | |
| 238 | // NewIndexer returns an Indexer implemented simply with a map and a lock. |
| 239 | func NewIndexer(keyFunc KeyFunc, indexers Indexers) Indexer { |
| 240 | return &cache{ |
| 241 | cacheStorage: NewThreadSafeStore(indexers, Indices{}), |
| 242 | keyFunc: keyFunc, |
| 243 | } |
| 244 | } |