java - Spring @Cacheable with complex keys still executed - Stack Overflow
The key does not appear correct -
You may have meant - @Cacheable(value="cacheName", key="#param1.concat('-').concat(#param2)")
Further, if the compilation is done without debug information, the param1, param2 argument names will not be available to expression evaluator. Instead you can refer to them using p0, p1 etc this way:
@Cacheable(value="cahceName", key="#p0.concat('-').concat(#p1)")
Update:
I have a one page test here which demonstrates how this works - https:/
Read full article from java - Spring @Cacheable with complex keys still executed - Stack Overflow
No comments:
Post a Comment