I'm writing a java project using Spring framework 3.2.4.
I have many SQL queries that needs to be cached for 10 seconds.
I know that with @cacheable annotation i can cache functions result.
What I don't understand is how to cache for only 10 seconds. i know you can add conditions to the cacheable annotation but it's hard for me to figure out how to add timing to these conditions.
any information regarding the issue would be greatly appreciated.