Project DescriptionCache expensive methods calls with a declarative attribute. No custom code required. Configure caching method using unity. Options include In-process and Out-Of-Process and Off. Out-Of-Process uses Microsoft ApplicationServer.Caching.
Simple Example:
[Cache.Cacheable] //this method now cached, will only be called once per guid
public SomeExpensiveObject GetExpensiveObject(Guid userId)
{
..
}
Cache with invalidation:
[Cache.Cacheable("UniqueKeyForThisMethod")] //cache using this key plus parameter(s)
public SomeObject GetObjectById(Int32 Id)
{
...
}
[Cache.TriggerInvalidation("UniqueKeyForThisMethod")] //delete from cache using this key and passed parameter(s)
public void RemoveObjectById(Int32 Id)
{
..
}
How does it work:
Using postsharp to make method interceptions when a cached version exists
Help- It's not working.
More Info.
Download Binary.