protected async Task <IEnumerable <T> > GetListAsync(string partitionKey, string listKey, Func <ICacheEntry, Task <IEnumerable <T> > > factory) { var recordKey = $"{KeyPrefix}:ListOf{partitionKey}:{listKey}"; var result = await InnerCache.GetOrCreateAsync(recordKey, factory); UpdateIndex(partitionKey, recordKey); return(result); }
protected async Task <T> GetAsync(string partitionKey, string itemKey, Func <ICacheEntry, Task <T> > factory) { var recordKey = $"{KeyPrefix}:{partitionKey}:{itemKey}"; var result = await InnerCache.GetOrCreateAsync(recordKey, factory); UpdateIndex(partitionKey, recordKey); return(result); }