예제 #1
0
 public IArrayCache <TElement, TArrayKey> GetArrayCache <TArrayKey>(Func <TArrayKey, IObservable <TElement> > arrayRetriever)
 {
     return(new ArrayCache <TElement, TId, TArrayKey>(arrayRetriever,
                                                      _idExtractor,
                                                      e => _elementCache.Set(_idExtractor(e), e),
                                                      e => ElementCache.Get(e))
     {
         MaxAge = () => _arrayMaxAge ?? TimeSpan.FromMinutes(1)
     });
 }