Questions tagged [cachemanager]

CacheManager is a caching abstraction layer for .NET written in C#.

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

The main goal of the CacheManager package is to make developer’s life easier to handle even very complex caching scenarios. With CacheManager it is possible to implement multiple layers of caching, e.g. in-process caching in front of a distributed cache, in just a few lines of code.

CacheManager is not just an interface to unify the programming model for various cache providers, which will make it very easy to change the caching strategy later on in a project. It also offers additional features, like cache synchronization, concurrent updates, serialization, events, performance counters… The developer can opt-in to those features only if needed.

48 questions
4
votes
1 answer

How can I get redis io client from NestJS CacheManager module

I am currently using cache manager module from NestJS and I was wondering why I can't get the NodeRedis client like this : constructor( @Inject(CACHE_MANAGER) private cacheManager: Cache, ) { cacheManager.store.getClient(); } I am…
LMinato
  • 43
  • 1
  • 3
3
votes
1 answer

EhCache 3 and Spring Boot

Is there a way to abstract the EhCache 3 CacheManager (org.ehcache.CacheManager) to Spring's CacheManager (org.springframework.cache.CacheManager)? With EhCache2, it is possible, by the following: @Bean public…
Christina
  • 361
  • 1
  • 5
  • 17
3
votes
2 answers

CacheManager - Refresh cache every x minutes or on expiration

Using CacheManager, how would you best go about implementing this scenario, where the cache instance contains data, that can take a long time to get from a slow source? I never want the users to wait for the cache to populate (I am not concerned…
Kjensen
  • 12,447
  • 36
  • 109
  • 171
2
votes
1 answer

'_cacheManager == null': is not true audio service issue fix

If anybody getting an issue in the audio_service library in flutter then this minor code may be helpful in fixing it WillPopScope( onWillPop: () async { await _audioHandler.stop(); return true; }, child: Scaffold(...))
2
votes
1 answer

No CacheResolver specified, and no unique bean of type CacheManager found

I am trying to use two Different types of Cache in my Spring boot application,based on Rest API called I hvae to store data in my cache. But during project deploy stage I am getting below error. [main] ERROR o.s.boot.SpringApplication - Application…
Loren
  • 320
  • 1
  • 10
  • 25
2
votes
1 answer

Should I cache json, Bson or JObject in the ICacheManager?

I have some JObjects which I need to cache, and I wonder what best practice is when caching such data in CacheManager? I'm concerned with Using a reasonably small amount of memory in the cache. Not unnecessarily serialize to avoid useless…
Gaute Løken
  • 7,522
  • 3
  • 20
  • 38
2
votes
0 answers

Unit tests for modules using Play cache (Scala)

Looking for some guidance for unit testing a module using Play cache in Scala. I have a method which queries database, gets static data and stores in Play's cache. While writing unit tests the following error shows: Error in custom provider,…
2
votes
0 answers

Using LoadingCache with CacheManager

I use next one for my custom cache manager: SimpleCacheManager cacheManager = new SimpleCacheManager(); GuavaCache myCache = new GuavaCache("telescope", CacheBuilder.newBuilder() .expireAfterWrite(5,…
Derz0st
  • 21
  • 2
2
votes
1 answer

Using MemoryCacheHandle with RedisCacheBackplane but without RedisCacheHandle

On the documentation it says /// The cache manager must have at least one cache handle configured with set to true. /// Usually this is the redis cache handle, if configured. It…
rebulanyum
  • 487
  • 10
  • 21
2
votes
1 answer

Register generic ICacheManager using an IoC container (Ninject)

This is for the CacheManager library by Michah Conrad. In his example, he creates a cache manager using the CacheFactory.Build method, as seen here: public class WebApiApplication : System.Web.HttpApplication { protected void…
Victor P
  • 1,496
  • 17
  • 29
2
votes
1 answer

CacheManager memcached configuration

I'm going to use CacheManager for my .net project. The problem is that I can't find any examples of CacheManager.Memcached usage. This is how I use it: public class GlobalCache { private static ICacheManager memcachedClient { get; set;…
Ulad Melekh
  • 924
  • 3
  • 17
  • 33
1
vote
2 answers

CacheManger defined as bean and in application.yaml

In Spring Boot, I would like to use one cache manager defined as bean plus Redis cache defined in application.yaml. But after define cache manager like bean the other one in application.yaml is ignored. @Bean public CacheManager cacheManager() { …
Pavel Hora
  • 143
  • 1
  • 11
1
vote
0 answers

How to create RedisCacheManager in spring-data 3.0.x

I'm migrating my application from spring boot 1.5.x to 3.0.x. I want to keep jedis but I have a problem with the instantiation of RedisCacheManager. Now constructor signature is RedisCacheManager(RedisCacheWriter cacheWriter,…
1
vote
2 answers

EhCache 3.9 -- Get All Cache Entries (working in EhCache 2.10)

The following code to fetch all caches is working in 2.10 (net.sf.ehcache.*) public Map> getCache() { Map> cachedData = new HashMap>(); …
Ali
  • 558
  • 7
  • 28
1
vote
0 answers

How can be automatically loaded the necessary map stored in memory?

I am making a mobile application using osmdroid. I want to be able to use it online and offline. I use CacheManager to custom download maps by storing them in .sqlite files in the / osmdroid folder. public void downloadMap() { final…
1
2 3 4