CacheManager

CacheManager is an open source caching abstraction layer for .NET written in C#. It supports various cache providers and implements many advanced features.

APACHE-2.0 License

Stars
2.3K

Bot releases are hidden (Show)

CacheManager - 1.2.0 Latest Release

Published by MichaCo almost 6 years ago

This will most likely be the last 1.x release of CacheManager. Version 2.0 will get more changes and maybe breaking changes and simplifications.

Because of building 2.0 is taking longer, I decided to re-release the 1.1.2 bits with .NET Standard 2.0 support and the StackExchange.Redis client upgrade to 2.x,.
Apart from that, the code is exactly the same as in Version 1.1.2!

Changes

  • Basic .NET Standard 2.0 support, without code changes to port some features to .NET Standard (see #221)
  • StackExchange.Redis client upgrade to 2.x (see #251)
CacheManager - 1.1.2

Published by MichaCo almost 7 years ago

Version 1.1.2

This release contains some bug fixes and minor improvements.

Bugfixes

  • Update StackExchange.Redis minimum version to 1.2.6 because of some bugfixes in that library - #179
  • Fixed an issue where using Default expiration mode didn't allow TimeSpan.Zero - #192
  • Fixed a compatibility issue with keys in Redis created with earlier versions of CacheManager - #183
  • Removed sealed from BaseCacheManager - #176
  • Fixed a bug where the default database setting in the connection string wasn't used - #175
CacheManager - 1.1.1

Published by MichaCo over 7 years ago

Version 1.1.1

This release contains some bug fixes and minor improvements.

New Features

Bugfixes

  • Redis OnRemove got triggered twice in some rare cases (see #168). Manual del will not trigger OnRemove anymore now
  • Race condition in dictionary cache handle (see #167)
  • Exception if no strictCompatibilityModeVersion is defined in app/web.config (see #165)
CacheManager - 1.1.0

Published by MichaCo over 7 years ago

Release 1.1.0 comes with some improvements for redis keyspace events and some love for the Couchbase based implementation.

New Features

  • If configured, CacheManager can now listen on external dels in Redis and sync the instances accordingly (see #148)
  • The redis backplane can now also be used with in-memory caches only (see #111).
  • Added compatibility mode setting to Redis and support for TwemProxy (see #54 and https://github.com/MichaCo/CacheManager/commit/07f1db9ff29291accb76c7b1bbb731d49bff6091). Also added lua script support without pre-loading (if that is not available).

Improvements for Couchbase (see #154)

  • Added netstandard support as the Couchbase client now supports it.
  • A bunch of configuration and initialization changes. The extensions to configure Couchbase now are more flexible.

Other Improvements

The API documentation has been updated/fixed to use latest version of docfx and is published on the re-designed site http://cachemanager.michaco.net.

Bug Fixes

  • #159 Small sanity check for too low expiration timeouts when using Redis
CacheManager - 1.0.1

Published by MichaCo over 7 years ago

Release 1.0.1

  • Improvements for using CacheManager in ASP.NET Core DI, new overloads for the IServiceCollection
  • Fixed an issue with NuGet references when CacheManager.Core was referenced implicitly only #147
  • Extended the RemoveByHandle event to also return the removed cache value (if possible). This is not supported for Redis key-events based triggers #144

Release 1.0.0

New Things

  • New serializer(s) based on Microsoft.Bond supporting all three Bond serializers! #127
  • Eviction based events reacting on the cache vendor specific evictions see #116
    • New event on BaseCacheManager with information about which cache handle and why the event was triggered
    • With this, CacheManager now can sync the cache Up.

Minor New Things

  • Dictionary Cache Handle now has a timer based eviction loop which should be more reliable.
  • The Memcached cache handle now finally has a working clear region function #104
  • All serializers can be used via Microsoft's configuration extensions as known types (also added to the json schema)
  • Memcached and Redis cache handles now can be configured to use an already initialized client. The WithxyzHandle extension methods have new overloads to pass in the existing client. #118

Bug Fixes

  • #134 Serialization had some issues in some cases with loading the correct Types
  • #136 when working with absolute expiration, there were some odds when renewing the expiration date
  • Memcached handle had a bug in version 0.9.3 when configured via xml configuration section, see #118

Breaking Changes

  • UpdateMode Full has been removed
  • Minimum netstandard has been increased to 1.2 from 1.1 for the Core package

Please report any bugs on github, and feel free to ask questions on either StackOverflow with the [cachemanager] tag or on our (moved) homepage http://cachemanager.michaco.net.

CacheManager - 1.0.0 Nuget Release

Published by MichaCo over 7 years ago

This is finally the 1.0 release.
It has been some time but after migration the solution to the new csproj format and Visual Studio 2017, it was about time ;)

Thanks everyone for supporting this library and sending in either feature requests, questions or bug reports!

New Things

  • New serializer(s) based on Microsoft.Bond supporting all three Bond serializers! #127
  • Eviction based events reacting on the cache vendor specific evictions see #116
    • New event on BaseCacheManager with information about which cache handle and why the event was triggered
    • With this, CacheManager now can sync the cache Up.

Minor New Things

  • Dictionary Cache Handle now has a timer based eviction loop which should be more reliable.
  • The Memcached cache handle now finally has a working clear region function #104
  • All serializers can be used via Microsoft's configuration extensions as known types (also added to the json schema)
  • Memcached and Redis cache handles now can be configured to use an already initialized client. The WithxyzHandle extension methods have new overloads to pass in the existing client. #118

Bug Fixes

  • #134 Serialization had some issues in some cases with loading the correct Types
  • #136 when working with absolute expiration, there were some odds when renewing the expiration date
  • Memcached handle had a bug in version 0.9.3 when configured via xml configuration section, see #118

Breaking Changes

  • UpdateMode Full has been removed
  • Minimum netstandard has been increased to 1.2 from 1.1 for the Core package

Please report any bugs on github, and feel free to ask questions on either StackOverflow with the [cachemanager] tag or on our (moved) homepage http://cachemanager.michaco.net.

CacheManager - 0.9.3 Nuget Release

Published by MichaCo over 7 years ago

This release has some new features and fixes.

New Features

  • Exists method to check if the key exists without actually retrieving it (if supported by the cache vendor) #46
  • Added more "knownTypes" to Microsoft.Extensions.Configuration based CacheManager configuration's json schema #125 #123
    • for the Microsoft.Extensions.Caching.MemoryCache based cache handle
    • Protobuf serializer
    • GzJson serializer
  • Allow Memcached and Redis cache handles to use pre existing cache clients. The clients can now be passed into the configuration methods WithRedisConfiguration, WithMemcachedHandle. #118

Other Changes

  • Instead of CacheManagerConfiguration now ICacheManagerConfiguration will be used everywhere (more injection friendly)
  • Improved validation at configuration time in case a cache handle requires a serializer, but none is defined (only net core target as full framework falls back to binary).
  • custom serialization logic for memcached to use our cache serializers instead of the build in binary.
  • Added overload to configure binary serializer settings during configuration.

Bug fixes

  • Validate expiration timeout not being in the past #74
  • Changed update mechanism in the redis implementation to use a version field #109
  • Fixed a bug where the mechanic in CacheManager which adds a key/value to other cache handles does not correctly apply expiration settings based on the cache handle configuration when it comes from Redis.
  • other minor things

Please report any bugs or issues you find on github

CacheManager - 0.9.2 Nuget Release

Published by MichaCo almost 8 years ago

see https://github.com/MichaCo/CacheManager/milestone/7?closed=1

Changes:

  • Rework of the event handling in CacheManager. Events are now more reliable and are now also getting triggered in multi instance scenarios using the backplane feature. Also, introduced an Origin property on the EventArgs which indicates where the event got triggered
  • GetOrAdd and Update/TryUpdate were throwing exceptions a little inconsistently. Introduced a new TryGetOrAdd method

Bugfixes:

  • Setting expiration mode to None for an individual cache item not working in some cases
  • Serializer settings are not getting applied correctly
  • Redis configuration via config file doesn't respect database if connection string is used
CacheManager - 0.9.1 Nuget Release

Published by MichaCo about 8 years ago

  • Protobuf serialization performance optimizations
  • Bugfix in redis value converter to support different corelib type versions
  • XML doc files now included in all nuget packages
  • all packages are now signed #87
CacheManager - 0.9.0 Nuget Release

Published by MichaCo about 8 years ago

The solution has been migrated to .NET Core 1.0 and build with the latest dotnet-cli.
Breaking Changes

  • none

New Features

  • New CacheHandle using Microsoft.Extensions.Caching.Memory (thanks to @AuroraDysis!)
  • Protobuf-net based serialization package added (thanks to @wenisman!)
  • Json Serializer got a GZip variant (thanks to @fgideali!)
  • New GetOrAdd method in the main interface

Bugfixes

  • #50 expiration setting issue in some scenarios
  • #51 Couchbase JArray support/fix (thanks to @Kriskit!)
  • #57 expiration precision issue
  • #60 some doc spelling mistakes (thanks to @michael-baker!)
  • #64 clear region issue with redis
  • #62 GetCasted improvement to support interfaces
CacheManager - 0.8.0 Nuget Release

Published by MichaCo over 8 years ago

Breaking Changes

  • CacheBackPlate got renamed to CacheBackplane. This affects all related implementations, documentation and configuration elements. #44

New features and updates

  • Added feature check for Redis cache handle, now supporting older versions of Redis server #42
  • CacheBackplane now works with events
  • CacheBackplane performance has been improved significantly #39
  • Documentation for Serialization added #40
  • API reference documentation: Replaced the old one with new, custom, based on docfx #40
  • Added periodical expire check to dictionary cache handle bf76178
CacheManager - 0.7.4 Nuget Release

Published by MichaCo over 8 years ago

  • Some Configuration refactoring / simplifications / extensions
  • Added CacheManager.Microsoft.Extensions.Configuration (fixes #43)
    • This allows users to load configuration from json files and other sources
    • Added a cachemanager.json schema file for json editors (like VS2015)
  • Renamed AspNetCore.Logging package to CacheManager.Microsoft.Extensions.Logging
  • First iteration on Back-Plate optimizations #39
CacheManager - 0.7.3 Nuget Release

Published by MichaCo over 8 years ago

This is just a dependency upgrade (downgrade) release.
All .NET Core dependencies have been downgraded to rc1-update1

The AspNetCore.Logging package is not compatible anymore with rc2 because of some API changes. Use rc1 dependencies only!

CacheManager - 0.7.2 Nuget Release

Published by MichaCo over 8 years ago

New Features

  • Added logging, added logging abstraction to core and a first implementation based on Microsoft.Extensions.Logging (new NuGet "CacheManager.AspNetCore.Logging")

Enhancements

  • Redis: Get, Set and Updates have been rewritten to use Lua scripts.
    This way all operations behave better than lock or transactions in worst case scenarios (fail overs, server restarts etc...)

Bugfixes:

  • Redis value converter didn't work with .net framework and .net core mixed clr types
  • Redis init with disposed TextWriter
  • In memory cache 'Update' didn't work properly
CacheManager - 0.7.1 Nuget Release

Published by MichaCo over 8 years ago

  • CLS compliance is back
  • Stackexchange.Redis reference update
  • Some minor changes
CacheManager - 0.7.0 Nuget Release

Published by MichaCo almost 9 years ago

  • New cache handle based on System.Web.Caching which can be used in ASP.NET 4 applications
    This cache handle relies on HttpContext.Current being available.
  • New serialization interface
    Serialization can now be configured and extended. The default serializer uses binary serialization which is usually pretty slow and is not portable. Currently there is only one alternative with the CacheManager.Serialization.Json package. More to come soonish
  • Simplification for configuration by code. Names for the cache instance and each handle are optional if applicable. The fluent builder methods have overloads without the names if possible. For some (redis) caches we still need the name to reference another configuration element though.
  • Many small improvements and bug fixes
CacheManager - 0.6.1 Nuget Release

Published by MichaCo almost 9 years ago

  • some minor enhancements and bug fixes
  • added non generic overloads to CacheFactory which can be used in conjunction with DI frameworks for example, related to #20. See examples
CacheManager - 0.6.0 Nuget Release

Published by MichaCo over 9 years ago

Main change in this release is the added VS 2015 aspnet based project structure and new targets including DNX 4.5.1 and DNX Core.

Automatic builds have been updated to run the new KoreBuild for the DNX solution. Also, the two new Appveyor builds do run the Redis tests!

No breaking changes have been introduced in the core, but I removed AzureCache and AppFabricCache from the supported cache vendors. Those packages will be discontinued from now on and existing NuGet packages might not be compatible with next versions of CacheManager!

Issues fixed in this release: #5, #9, a lot of other minor things.

New

  • AddOrUpdate method
  • Modified initialization of BaseCacheManager. Can now be instantiated via constructor normally, by passing in a valid configuration.
CacheManager - 0.5.0 Nuget Release

Published by MichaCo over 9 years ago

  • CacheManager name moved from configuration to BaseCacheManager. This might introduce code changes because the ConfigurationBuilder now doesn't take the name anymore, but the CacheFactory now does
  • Removed some interfaces which are not needed/wanted
  • Cachemanager.Core.Configuration refactoring
  • Code cleanup and documentation
CacheManager - 0.4.4.1 Nuget Release

Published by MichaCo over 9 years ago

Bugfix for wrong expiration being set in some cases