Как я могу получить все значения из кэша, используя ehcache3. я видел
документацию и попробовал с примером, приведенным в ссылке -
https://www.baeldung.com/spring-boot-ehcache
I followed this link as well -
http://www.ehcache.org/documentation/3.1/107.html
I didn't found any concrete example how to use cachemanaget to retrive
elements from a specific cache.
These are the dependencies added in the pom -
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-cache</artifactId>
</dependency>
<dependency>
<groupId>org.ehcache</groupId>
<artifactId>ehcache</artifactId>
<version>3.6.2</version>
</dependency>
<dependency>
<groupId>javax.cache</groupId>
<artifactId>cache-api</artifactId>
</dependency>
This is my method -
@Cacheable(value = "idAndEmail", key="#idEmail")
public HashMap<String, String>
getidAndEmail(HashMap<String,String> idEmail) {
System.out.println("caching id and email, next refresh happens
after configured time");
return idEmail;
}
Here caching works but how to fetch the values based on the keys ?
Help would be really appreciated.