public async Task <Modifiable> OnStore(ICacheContext context, object result)
        {
            CacheStoreContext handlerContext = null;

            foreach (var handlerInfo in GetHandlerInfo(CacheHandlerType.Store))
            {
                if (handlerContext == null)
                {
                    handlerContext = ((Func <ICacheContext, object, CacheStoreContext>)handlerInfo.InitialConstructor)(context, result);
                }
                else
                {
                    handlerContext = ((Func <CacheStoreContext, CacheStoreContext>)handlerInfo.ContinuationConstructor)(handlerContext);
                }

                await handlerInfo.Handler(handlerContext);
            }

            return((handlerContext ?? new CacheStoreContext <object>(context, null)).GetHandlerResult());
        }
 public virtual Task OnStore(CacheStoreContext context)
 {
     return(Task.FromResult(true));
 }
 protected CacheStoreContext(CacheStoreContext context)
     : base(context)
 {
     Result = context.Result;
 }