Skip to content

david0718/BlendedCache

 
 

Repository files navigation

BlendedCache

Blended Cache Framework for .net

Basic Principles:

  • 3 layers of caching:
    • Context (Thread based)
    • Volatile (in memory)
    • LongTerm (out of process)
  • Wraps up interaction of 3 layers, back filling. eg found in longTerm, put in context, volatile
  • Provides flush mode support for forcing refreshes at various layers.
  • Allows type load configuration to auto-load items.
  • LongTerm supports Refresh and Absolute expiration time. Also background refresh support with TypeLoadConfig
  • LongTerm supports Database down Func<bool> parameter to by pass expiration and keep system running.
  • LongTerm ideal permanent distributed cacheStore such as memcached, azure, etc.

Sample Context and Volatile for a website.

var contextCache = new HttpContextCache(); // IContextCache
var volatileCache = new RuntimeMemoryCachingVolatileCache();
var configuration = new BlendedCacheConfiguration();

//fancy ioc stuff here.
return new BlendedCache(contextCache, volatileCache, NullLongTermCache.NullInstance, configuration);

Building Source

NuGet auto-download is required to be configured to supply any third-parties.

  1. Tools -> Options -> Package Manager
  2. Check the box that says "Allow NuGet to download missing packages during build"

About

Blended Cache Framework for .net

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C# 100.0%