Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to debug spring cacheable?

Tags:

java

spring

We are trying to figure out how to tell whether spring's annotation "@Cacheable" is working or not. So far we've been debugging the application (running the IDE in debug's mode), and what we can see is that we are actually getting within the method's implementation. Wasn't that exactly not supposed to happen? Considered that it is cached.

like image 286
marcosEgatzWozniak Avatar asked Sep 12 '25 04:09

marcosEgatzWozniak


1 Answers

The debugging turn out to be as expected (i.e. the cached method "should skip" once is effectively chached). The issue probed to be an environment misconfiguration in the application's environment.

like image 104
marcosEgatzWozniak Avatar answered Sep 13 '25 17:09

marcosEgatzWozniak