Spring + Ehcache : Not able to get the cache back from cacheManager without key
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 manager
@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?
Cache cache = cacheManager.getCache("productAll");
Please advise Thanks in advance!