Der Spring-Cache funktioniert nicht, wenn die zwischengespeicherte Methode von einer anderen Methode derselben Bean aufgerufen wird. Hier ist ein Beispiel, um mein Problem klar zu erklären. Aufbau: <cache:annotation-driven cache-manager="myCacheManager" /> <bean id="myCacheManager" class="org.springframework.cache.ehcache.EhCacheCacheManager"> <property name="cacheManager" ref="myCache" /> </bean> <!-- Ehcache library setup --> <bean id="myCache" class="org.springframework.cache.ehcache.EhCacheManagerFactoryBean" p:shared="true"> <property name="configLocation" value="classpath:ehcache.xml"></property> …
In den Dokumenten zu ehache heißt es: timeToIdleSeconds: Sets the time to idle for an element before it expires. i.e. The maximum amount of time between accesses before an element expires timeToLiveSeconds: Sets the time to live for an element before it expires. i.e. The maximum time between creation time …
Das passiert, wenn ich meine Junit-Tests durchführe ... Another CacheManager with same name 'cacheManager' already exists in the same VM. Please provide unique names for each CacheManager in the config or do one of following: 1. Use one of the CacheManager.create() static factory methods to reuse same CacheManager with same …
Aus der Frühjahrsdokumentation : @Cacheable(value="bookCache", key="isbn") public Book findBook(ISBN isbn, boolean checkWarehouse, boolean includeUsed) Wie kann ich angeben @Cachable, ob isbnund checkWarehouseals Schlüssel verwendet werden soll?
We use cookies and other tracking technologies to improve your browsing experience on our website,
to show you personalized content and targeted ads, to analyze our website traffic,
and to understand where our visitors are coming from.
By continuing, you consent to our use of cookies and other tracking technologies and
affirm you're at least 16 years old or have consent from a parent or guardian.