I have a simple spring 3.2 web application, which is connected to a MySQL db. My question is simple: I have method in dao, which is annotated with @Cacheable. Is there a way to log if the method goes to db, or its result is loaded from cache? For example, I'd like to see the following log:
Object with id 'x' was retrieved from database at 23:44:30 / 2015....
Object with id 'x' was retrived from cache at...
Thank you