This project is read-only.


Remove outputcache based on profile


Is that possible?
Closed Sep 11, 2013 at 5:12 PM by moonpyk


jogai wrote Aug 29, 2013 at 9:28 AM

Or an option to add tags to the cache attribute wich in turn can be used to remove caches..

moonpyk wrote Sep 11, 2013 at 5:12 PM

This can already be done by specifying a VaryByCustom attribute, call it "Profile"(, implement it in your Global.asax, making it return the current UserIdentity/Group string.

Then later, when you need to invalidate your cache items, create one instance of OutputCacheManager and call RemoveItems("<YourController>", "<YourAction>", new { Profile="<profileToClean>" }); on it.