-
-
Notifications
You must be signed in to change notification settings - Fork 457
Closed
Labels
Description
Hi,
Sometimes the null value is a significative value and CacheManaget library does not support this case.
I would like manager this behavior.
My suggestion is enable/disable this feature by ICacheManager.Configuration.
Exemple:
cacheManager = CacheFactory.Build("name", settings => settings.WithMicrosoftMemoryCacheHandle("handle"));
// New property... default its false for compatibility
cacheManager.Configuration.AllowNull = true;In my case, I read params from database and store in memory cache by X minute, but if value does not exists in database, I would like stored this key in memory cache with null value, and reduced sql overhead to try to obtain inexistent value.
This behavior is planned and supported by Microsoft IMemoryCache for example.