3rd party (or even 1st party) modules are currently very restricted in the way that they can interact with the Output Cache functionality.
I propose adding an event handler interface to allow developers to hook into specific events offered by the Output Cache filter.
This could look something along the lines of this:
public interface IOutputCacheEventHandler : IEventHandler
{
void Caching(string cacheKey, CacheItem cacheItem);
void Cached(string cacheKey, CacheItem cacheItem);
void Retrieving(string cacheKey);
void Retrieved(string cacheKey, CacheItem cacheItem);
}
Example use cases would be:
- Altering markup immediately before the item is cached (for example to remove the Glimpse console)
- Adding additional logging or diagnostics
3rd party (or even 1st party) modules are currently very restricted in the way that they can interact with the Output Cache functionality.
I propose adding an event handler interface to allow developers to hook into specific events offered by the Output Cache filter.
This could look something along the lines of this:
Example use cases would be: