Questions tagged [jcache]

JCACHE :JSR 107- Java Temporary Caching API. Specifies API and semantics for temporary, in-memory caching of Java objects, including object creation, shared access, spooling, invalidation, and consistency across JVM's. source: https://jcp.org/en/jsr/detail?id=107

Introduction

Cache is the API being defined in JSR107. It defines a standard Java Caching API for use by developers and a standard SPI ("Service Provider Interface") for use by implementers.

Maven Dependency:

<dependency>
    <groupId>javax.cache</groupId>
    <artifactId>cache-api</artifactId>
    <version>1.0.0</version>
</dependency>

Gradle dependency:

compile 'javax.cache:cache-api:1.0.0'

The specification is available online.

184 questions
0
votes
1 answer

Spring Cache+Redis cache doesn't calculate keys based on method/class names

I'm using redisson with a jcache abstraction, simply put I have this: public class MyService{ @Cacheable("cacheA") public String returnSomethingAfterLongTime(String parameter){ //... } @Cacheable("cacheA") …
Phate
  • 6,066
  • 15
  • 73
  • 138
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
2 answers

How can I cluster application-scope state in wildfly?

I would like to cluster a map that is kept on application-level scope. A first thought was to use a @Singleton, @Clustered bean with a field holding my data. This does not seem to work and my guess is that it was never implemented This post proposes…
Marinos An
  • 9,481
  • 6
  • 63
  • 96
0
votes
1 answer

setStoreByValueJCache + Hazelcast interface does not work

I have done some test using setStoreByValue(true/false) and I do not appreciate the difference. I expect to store in the cache a lot of more that 30 objects when I use store by reference. CacheManager manager =…
Hossain
  • 31
  • 6
0
votes
1 answer

Error JCache with Hazelcast implementation java.io.NotSerializableException

I have start to use JCache with Hazelcast implementation. When I try to put in cache an object I get the following error: Caused by: java.io.NotSerializableException: com.catenic.anafee.common.type.CaBigNumber$$Lambda$131/1884551977
Hossain
  • 31
  • 6
0
votes
1 answer

How to programmatically override ehcache configuration set in xml file? Or How to set CacheLoaderWriter bean to ehcache xml configuration?

I want to use read-through and write-through cache strategies using Ehcache and I am using XML configuration to configure Ehcache, I want to set spring bean (CacheLoaderWriter implementation) to cache configuration, I can't do that using XML…
Amit Patil
  • 710
  • 9
  • 14
0
votes
0 answers

Hibernate + jcache + ehcache integration not woking

In my application I want to enable second level cache by using Hibernate 5.4 and EHCache 3.7 but I am getting this error java.util.ServiceConfigurationError: javax.cache.spi.CachingProvider: Provider org.ehcache.jsr107.EhcacheCachingProvider could…
althor
  • 739
  • 2
  • 9
  • 21
0
votes
0 answers

Hazelcast JCache Listener is being serialized?

I have two spring-boot services that talk to each other through a caching layer ( because of reasons not related with the issue ). I am using JCache (jsr-107) api to abstract away the actual cache provider, in this case Hazelcast. I am manually…
pmanolov
  • 623
  • 1
  • 6
  • 19
0
votes
1 answer

JCache: Incompatible cache key types specified, expected class java.lang.Object but class java.lang.String

I am having an issue configuring a Cache in Spring boot. It was working fine and after some unrelated changes, it stopped working. I have the following cache configuration: @Configuration public class UserMappingCacheConfig { public static final…
JPS
  • 526
  • 7
  • 19
0
votes
0 answers

Hazelcast user code deployment with Jcache

I have a hazelcast Member that uses Jcache. I am using CacheLoader and CacheWriter for Jcache. On another member that is clustering, I am getting an exception that one of the Jcache CacheLoader classes can't be loaded. The cacheloader is defined as…
Manish
  • 909
  • 1
  • 11
  • 23
0
votes
1 answer

What is a sensible mulitcast address for Apache Ignite?

In order for Apache Ignite to form a multinode cluster the nodes need to know about eachother. This can be achieved using ip multicast. The class to do this in Ignite is TcpDiscoveryMulticastIpFinder which has property "mulitcastGroup" which is in…
murungu
  • 2,090
  • 4
  • 21
  • 45
0
votes
1 answer

Java JCache String key vs Composite key

I am using JCache for caching web responses. The cache key includes following fields: controller: String action: String parameters: Array I created ResponseKey class and use it as a cache key type: public class ResponseKey implements Serializable…
LHA
  • 9,398
  • 8
  • 46
  • 85
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

how to configure eviction policy like LFU and LRU in jcache

I want to set LFU eviction policy for redis. how to configure eviction policy like LFU and LRU with the help of jcache API or redisson API?
akshaya
  • 99
  • 9
0
votes
1 answer

How to set only one ehcache.xml in a multimodule project?

I have one "common" project where I want to put the ehcache.xml. Then, I have a series of spring boot projects, using the EnableCaching annotation in this way: @EnableCaching public class Project1SpringBoot { .... .... Inside of the…
Phate
  • 6,066
  • 15
  • 73
  • 138