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
1
vote
0 answers

Hystrix javanica cache and JCache

I have a SpringBoot (2.1.7) application with Hystrix (Javanica) and JCache (EHCache implementation). I have methods annotated with the @HystrixCommand annotation to enable Hystrix for them. I also have caching on those methods. It looks like…
Sven
  • 2,343
  • 1
  • 18
  • 29
1
vote
1 answer
1
vote
1 answer

Is there a way to modify a JCache's expiry policy that has been declared declaratively?

I'm using Hazelcast 3.12 jCache implementation. My cache has been declared declaratively (via hazelcast-config.xml), however I want to be able to change the ExpiryPolicy's duration dynamically, as the timeout value is only available…
Eric B.
  • 23,425
  • 50
  • 169
  • 316
1
vote
1 answer

Anyway to view Cache entry metadata from Hazelcast (ie: date added, last accessed, etc)?

I'm using Hazelcast with a distributed cache in embedded mode. My cache is defined with an Eviction Policy and an Expiry Policy. CacheSimpleConfig cacheSimpleConfig = new CacheSimpleConfig() .setName(CACHE_NAME) …
Eric B.
  • 23,425
  • 50
  • 169
  • 316
1
vote
0 answers

How to set a hazelcast cache wrappered from JCache in a hazelcast instance

I am trying to build an example in order to check if I can access to cache in the second request. In the first request I create the cache and I would like to check that the cache I available in the second request. boolean existCache =…
Hossain
  • 31
  • 6
1
vote
1 answer

Infinispan-specific configuration when used as JCache (JSR-107) provider?

Our Thorntail (2.4.0.Final) webapp is using Infinispan as a JCache (JSR-107) provider. We would like to modify Infinispan specific attributes (such as default acquire timeout) in addition to JCache's attributes (such as store-by-value option). Our…
geca
  • 2,711
  • 2
  • 17
  • 26
1
vote
1 answer

Using a cache as a layer in front of a database

I'm working on some back-end service which is asynchronous in nature. That is, we have multiple jobs that are ran asynchronously and results are written to some record. This record is basically a class wrapping an HashMap of results (keys are…
IsaacLevon
  • 2,260
  • 4
  • 41
  • 83
1
vote
1 answer

JCache CacheResult - creating caches with the default name

I'm using JCache annotations with Spring and EhCache. If I use @CacheResult on a method without specifying the cache name (or a @CacheDefaults on the class), then the default cache name resolves to the fully qualified method name. However such a…
Oceanic
  • 1,418
  • 2
  • 12
  • 19
1
vote
0 answers

Local cache with Infinispan in wildfly 14

The last few days I take a look to use infinispan to manage a cache with my applications. I have some ears applications that runs on same wildfly and my purpose is to have a local cache that all my application can use. This cache will not be shared…
balax85
  • 36
  • 2
1
vote
1 answer

JCache with Infinispan in Wildfly 14 generate Unsatisfied dependencies for type InfinispanExtensionEmbedded with qualifiers @Default

I'm following some guide to set JCache in Wildfly 14 enviroment using as provider Infinispan. I followed these steps : - I downloaded the wildfly module version 9.4.14 from Infinispan website - I copied the content of the zip in the module dir of…
balax85
  • 36
  • 2
1
vote
1 answer

Spring JCache logging cache hits

I have a method on which I added a cache by adding the @CacheResult annotation (I actual created a proxy because I can't change the original implementation of SomethingService): @Service public class SomethingServiceProxyImpl implements…
1
vote
1 answer

Clear a cache with JSR-107 annotations

On a REST API, I want to create a single endpoint that clears a specific cache: DELETE /cache/{cacheName} Is it possible to implement it instead of: public void clearCache(String cacheName) { cacheManager.getCache(cacheName).clear(); } to…
anat0lius
  • 2,145
  • 6
  • 33
  • 60
1
vote
1 answer

Ehcache jsr107:defaults not applying to programmatically created caches

Based on my findings in my previous SO question, I'm trying to setup JCaches in a mix of declarative and imperative configuration, to limit the max size of caches declaratively. I keep a list of the caches and the duration (TTL) for their entries…
JPS
  • 526
  • 7
  • 19
1
vote
2 answers

Hazelcast client metrics have no value (are always 0.0)

Background / Project Setup: We are developing a (micro-) service in Springboot (`2.0.4.RELEASE`) with JCache (`javax.cache:cache-api:1.1.0`). We recently switched from Ehcache to Hazelcast (`3.10.4`) to have a central cache cluster for our…
Stefan Kreidel
  • 156
  • 2
  • 7
1
vote
1 answer

Apache Ignite Cache with Postgresql

I am looking for days to understand the cache with postgressql Here is the POST class public class Post implements Serializable { private static final long serialVersionUID = 0L; private String id; private String title; private String…
monstereo
  • 830
  • 11
  • 31