I am using Spring + Ehcache for my cache layer and it is working. But for some reason I wanna manipulate the cache manually.
These works fine.. but when I try to manually update the productAll cache in the saveProduct function. I am not able to get the cache back from the cache managerCode:@Cacheable(value = "productAll") public List<Product> getAllProduct() @CacheEvict(value = "product", key = "#product.id") public Product saveProduct(Product product) @Cacheable(value = "product") public Product getProductById(Long id)
What is the key that I should use in this case when no key is provided when we cache in the getProductAll method?Code:Cache cache = cacheManager.getCache("productAll"); cache.get("");
Please advise Thanks in advance!


Reply With Quote
