Refactor OutputCache storage to make use of Orchard.Caching


...so when implementing a new provider for caching (e.g. a distributed one) we only have to deal with one service by default.

I'd make Orchard.OutputCache CacheService use Orchard.Caching ICacheService for storage instead of having a different set of services for IOutputCacheStorageProvider implementations. Or, to keep maximimal flexibility, the default IOutputCacheStorageProvider could use Orchard.Caching ICacheService instead of accessing the http cache directly.

Also tag service could use ICacheService to store that dictionary.

This way just by adding a new Orchard.Caching service you can make OutputCache use that too, by default. By keeping the IOutputCacheStorageProvider interface we could still have the flexibility to store output cache and runtime cache items separately.


Piedone wrote Aug 12, 2014 at 10:13 AM

rdobson wrote Aug 14, 2014 at 12:12 PM

Id vote for the maximal flexibility option as we have written our own implementation of IOutputCacheStorageProvider to change how the output cache is stored (to disk and blob storage), IMO Orchard.OutputCache and Orchard.Caching are two different things and it would be a shame to unseparably tie them together

sebastienros wrote Jan 8 at 8:43 PM

They have different requirements, I prefer to keep them separate.