Jordan Earls  committed 15581e6

Apparently bitbucket doesn't like `==` in markdown

  • Participants
  • Parent commits ee39b4d
  • Branches default

Comments (0)

Files changed (1)

-== Introduction ==
 This is a T4 template and library to make caching awesome and pain free! This is accomplished
 by utilizing the code-generation abilities of T4 to write the really hard and tedious code for you. 
 This leaves you with a static class, which passes through to a chosen `CacheMechanism`, with the correct type. 
 Finally! No more manual casting, remembering what the caching options should be, nor what the magic string is. 
-== Example == 
 Let's say you want to cache blog posts and the generated HTML for some high traffic page in our ASP.Net website
 	//a super easy pattern to load the cache if it doesn't exist
 	var post= MyCache.BlogPosts[id] ?? MyCache.BlogPosts[id]=LoadPost(id);
-== ICacheDictionary == 
 There are currently two options for the CacheDictionary. Which one wokrs best for you will depend on your use case:
 there could always be that one stray race condition that I didn't catch. Also, the tracking requires a few locks and it can possibly break if you have a LOT of different keys which will
 seldom be acessed. Tracking a very large number of keys might make you hit the maximum object size limit, as well as possibly leaking memory. I recommend only using it if you really have to. 
-== CacheMechanism == 
 This is an extremely simple to implement interface to your caching method. Basically, nulls can not be cacheable is the only strict requirement. If a value is passed in as null, then
 the value associated with the passed in key should be removed from the cache. Also, these methods MUST be thread-safe.