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
2
votes
1 answer

Redisson (through JCache API) deserialising only to String

I have a Redisson client to store a pair String, LocalDateTime. It's configured to be used through the JCache API (JSR-107). The storage is done OK, converting with Jackson to values like 2018-01-23T11:59:34.997834 but for retrieval is not using any…
Pedro R.
  • 142
  • 1
  • 11
2
votes
1 answer

Save order of entries with JCache implementation

I want to cache the content in a DB table like below, on the Java heap of an JavaEE application server. | group | key | value | | ------- | ------- | -------------------------------------- | | CHAR(3) | CHAR(5)…
SATO Yusuke
  • 1,600
  • 15
  • 39
2
votes
2 answers

Error while setting Up Ehcahe 3 with spring boot 1.5

I have recently upgraded to spring boot 1.5.7 from 1.4 and found that Ehcache has been upgraded to 3.x from 2.x. The configurations have all changed. Now I am unable to set up the caching config. I tried following the steps on the official blog at…
Nikhil Sahu
  • 2,463
  • 2
  • 32
  • 48
2
votes
1 answer

How to dynamically create a cache in Spring Boot?

I create a spring boot project use jcache, config like this: spring.cache.jcache.provider=org.ehcache.jsr107.EhcacheCachingProvider spring.cache.jcache.config=classpath:ehcache.xml I want to create cache dynamically, my code like…
tedeum
  • 185
  • 3
  • 14
2
votes
2 answers

How does EhCache3 handle eviction when cache is full?

Eviction policies seem to be removed in EhCache3. There is an EvictionAdvisor interface that can be implemented, but what would be the default behaviour? I am using EhCache3 with SpringBoot.
Rando
  • 25
  • 7
2
votes
0 answers

Spring JCache with Hazelcast data eviction

I have a question regarding the caching in spring boot application. I have simple web application where I manage one entity, use Spring Data JPA, JCache with Hazelcast implementation. I've created two caches: One caches entity by id Another one by…
Marian
  • 387
  • 3
  • 17
2
votes
2 answers

How to get the configuration of a given cache in Apache Ignite?

For instance, I configure the cache the following way: public IgniteCache getOrCreateCache(String cacheName) { Ignite ignite = Ignition.ignite(); CacheConfiguration cacheCfg = new CacheConfiguration
Yuci
  • 27,235
  • 10
  • 114
  • 113
2
votes
1 answer

How to configure Apache Ignite cache with multiple expiry policies

For example, I would like to configure the cache with the following two expiry policies: TouchedExpiryPolicy CreatedExpiryPolicy The sample code is as below (Apache Ignite version 1.5.0.final): public IgniteCache
Yuci
  • 27,235
  • 10
  • 114
  • 113
2
votes
1 answer

Why I have cache misses in Service using Spring Cache

I have configured my cache as follows: @Configuration @EnableCaching public class CacheConfig { @Bean(name = "caffeineCachingProvider") public CachingProvider caffeineCachingProvider() { return…
marknorkin
  • 3,904
  • 10
  • 46
  • 82
2
votes
2 answers

How to configure Jcache with Ecache as Provider in Spring application-context.xml?

Spring documentation provides below information. I…
Raj
  • 31
  • 1
  • 3
2
votes
1 answer

Use @CacheResult when the method has no argument

I have a method that returns the (rarely-changed) configuration of a system and want to cache it. The configuration is built from different pieces of data so I don't want to cache the individual pieces, but the SystemConfiguration object…
wishihadabettername
  • 14,231
  • 21
  • 68
  • 85
2
votes
2 answers

Prevent unwanted access to Hazelcast Community Edition cluster

I run Hazelcast 3.4 in a two machine cluster. In order to sync their content I have them connected over the network. Now I do search means to prevent unwanted write and if possible read access to either of them. Security is only available in the…
Marged
  • 10,577
  • 10
  • 57
  • 99
2
votes
2 answers

Exception while trying to make Hazelcast cluster work with JCache compliant client

I am trying to make a small Hazelcast cluster cooperate with simple JCache compliant client. Unfortunately, I get the exception: "java.lang.IllegalArgumentException: No service registered with name: hz:impl:cacheService". I would appreciate a clue…
Tomasz Siorek
  • 701
  • 5
  • 10
2
votes
1 answer

HazelcastClientCachingProvider class not found exception when requesting hazelcast jcache provider

I'm having a strange warning when I try to use Hazelcast-based implementation of JCache (i.e. JSR 107) as follows (original sample code): // Explicitly retrieve the Hazelcast backed javax.cache.spi.CachingProvider CachingProvider cachingProvider =…
bachr
  • 5,780
  • 12
  • 57
  • 92
2
votes
1 answer

Main advantages/disadvantages of coherance and ehcache as RI of Jcache API

It will be good if some one can describe the main adv. and disadv. of using ehcache and oracle coherance as RI of JCache API. Of course it could be done by learning each framework separatly. But to see a whole picture from the top I think it can…
slisnychyi
  • 1,832
  • 3
  • 25
  • 32
1 2
3
12 13