Questions tagged [jsr107]

JSR 107: JCACHE - Java Temporary Caching API

More details on Spring

33 questions
1
vote
2 answers

Cache key issues with Jcache

I am using JSR107 caching with Springboot. I have following method. @CacheResult(cacheName = "books.byidAndCat") public List getAllBooks(@CacheKey final String bookId, @CacheKey final BookCategory bookCat) { return <
1
vote
1 answer

Understanding @Enable... annotations concurrency

We have a project that uses spring-boot-cache-starter, registering an ehCache CacheManager implementation, and spreading @Cacheables accross the code. Then, some other team created an starter, that basically relies on the default configuration…
Whimusical
  • 6,401
  • 11
  • 62
  • 105
1
vote
2 answers

Lock on a key in a hazelcast cluster

I am writing a distributed application using Hazelcast(JCache standard) for caching. I have an use case where I should put a lock on specific key in a cluster to prevent from calls during updating. thread1: get item1 for a config change(put a…
Forin
  • 1,549
  • 2
  • 20
  • 44
1
vote
1 answer

Enabling JMX Support in ehcache 3.1.2

I am using camel 2.18.1 and the camel-ehcache component to build a simple cache. While the cache setup is working okay, I am finding it difficult to register mbeans using ehcache 3.1.2 ( this is pulled in via camel). Reading the documentations - it…
Ankur Saxena
  • 109
  • 4
  • 11
1
vote
1 answer

How to use Apache Ignite as JSR 107 cache?

I figured out a JSR 107 cache would be configured as follows: private final static CacheManager MANAGER = Caching.getCachingProvider().getCacheManager(); private final static Cache> CACHE; private final…
Kalle Richter
  • 8,008
  • 26
  • 77
  • 177
1
vote
2 answers

What are the Maven coordinates for the JCache API jar?

I have an executable JAR (not a web app being deployed to a standard container like Tomcat, etc.) that needs to connect to a DB and cache a lot of stuff. If at all possible, I'd like to use the JCache API and inject (via Guice) the Hazelcast…
smeeb
  • 27,777
  • 57
  • 250
  • 447
1
vote
1 answer

Does javax.cache.annotation.CacheResult in infinispan need parameters in the method

Good day, I’m at the moment puzzled a bit by javax.cache.annotation.CacheResult implementation in the JBoss Enterprise Application Platform 6.1 and 6.3 of infinispan. I have been googling and going through stackoverflow but I have not really found…
Thadir
  • 201
  • 2
  • 16
0
votes
0 answers

JCache's CacheFactory class not available while trying to get a Memcache Instance (AppEngine)

Currently I started learning about App Engine, and I am trying to cache my data into the Memcache. I followed the Google's App Engine documentation for…
0
votes
1 answer

How to avoid caching null values in redis cache

@CacheResult(cacheName = "testCache) public Employee geteEmployee(@CacheKey String empId) { //logic return employee; } If employee is null, that null value should not be cached.
0
votes
1 answer

Why a class included in Infinispan's white list still throws the error 'No marshaller registered'?

I'm using Infinispan 10 and Wildfly 17. I have an infinispan.xml file with a white list of classes where I specify the marshaller:
teleco
  • 21
  • 5
0
votes
1 answer

call a static method on a parameter while using @CacheResult

I need to cache the result of a method that call a webservice. The method signature is like this : public Result search(long id, String name, Date date); and the result depends on all the parameters I created the ehcache configuration for the…
Younes HAJJI
  • 375
  • 3
  • 21
0
votes
1 answer

EHCache+Tomcat+Terracota+Jsr107+Spring+@CacheEvict(allEntries=true) = UnsupportedOperationException: Implement me

I managed to join EhCache with Terracota for distributed clustering (item at https://github.com/ehcache/ehcache3/releases/download/v3.4.0/ehcache-clustered-3.4.0-kit.zip) and make an Spring Configuration Integration like: import java.net.URI; import…
Fibman
  • 126
  • 9
0
votes
1 answer

How can I configure custom Serializers / Copiers in XML for JSR-107 (JCache) with Ehcache?

I have a question concerning JCache / Ehcache XML configuration. I'm using the JSR 107 Cache Annotations CDI Reference Implementation together with Ehcache. I want to annotate specific methods with @CacheResult, so that the result of these methods…
0
votes
1 answer

Cache annotations in playframework with guice

I'm trying to plugin cache-annotations-ri-guice as mentioned here. I found a description. But it doesn't work. My test project looks like public class HomeController extends Controller { public Result index() { return…
pswrdf
  • 95
  • 11
0
votes
1 answer

How do I adapt Spymecached to net.sf.jsr107cache.Cache?

I need to write a new implementation against net.sf.jsr107cache.Cache using the Java net.spy.memcached package (for Redis Cloud Memcached). The package does not include an implementation this interface. I can of course write an adapter and…
Joshua Fox
  • 18,704
  • 23
  • 87
  • 147