support multiple index values for a single object

This commit is contained in:
deads2k
2015-07-28 10:01:05 -04:00
parent c5bffaaf31
commit 9386db8c99
8 changed files with 172 additions and 28 deletions

View File

@@ -169,6 +169,10 @@ func (c *cache) ListIndexFuncValues(indexName string) []string {
return c.cacheStorage.ListIndexFuncValues(indexName)
}
func (c *cache) ByIndex(indexName, indexKey string) ([]interface{}, error) {
return c.cacheStorage.ByIndex(indexName, indexKey)
}
// Get returns the requested item, or sets exists=false.
// Get is completely threadsafe as long as you treat all items as immutable.
func (c *cache) Get(obj interface{}) (item interface{}, exists bool, err error) {