Keybuilder.BuildCacheKey Includes Namespace and Class

Jun 9, 2013 at 3:07 PM
Hey guys,

First off, this project is a great open source offering.

Next up, I am trying to use caching across classes. While testing this, I noticed that the Keybuilder.BuildCacheKey method appends the namespace and class to the end of the user provided key (aka GroupName):
        if (instance != null)
        {
            cacheKeyBuilder.Append(instance);
            cacheKeyBuilder.Append(";");
        }
I wanted some background on why this is done (pattern? practice? something I just missed?) before I go ahead and nuke that block of code.

I appreciate any feedback folks might have.

Joe
Oct 6, 2013 at 10:47 AM
I'm posting here for the same reason. I ran across CacheAspect while working on a multi-region multi-language multi-brand world-recognised commercial web application (won't name drop as I'm an external consulting developer, but it's big), and pulled this nice piece of work into my personal development space, and the very first thing I ran into was the inability to invalidate larger sections of my cache. As a first step created an ICache implementation, and when I ran into this limitation I hacked #HACK# into the keyname so that I could do magic later as POC. I've now downloaded the sources and will extend.
Oct 28, 2013 at 1:38 AM
Hi Guys,
Author here. I'm glad you are getting value out of this project. It has been sitting stagnate for a little while but I'm going to try to revive it.

I am moving source control to git hub to improve ease of contributions. See here:

https://github.com/agbell/attribute-based-caching

Joe, to answer your question very late, I built this for use with a straight repository pattern, so all caching / cache invalidating a user object is in the user repo. That is just how I was using it.