Announcement Announcement Module
Collapse
No announcement yet.
Populate different cache based on condition Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Populate different cache based on condition

    Hi,

    How can I apply caching on a method which polupates multiple caches based on a given condition?
    Or is there a work-around to apply multiple @Cacheable annotations on the same method?

    The method that I want to cache fetches data from the database based on an given period. (hour, day, week, month)
    I want to cache data for a day shorter than the data for a week and month.

    Someone any idea how to achieve this?

    I have tried to create custom annotation which has a different condition and cache declaration, but that didn't work.

    regards,
    Auke

  • #2
    I solved this. I had a fault in the SpEL condition.

    Thread can be closed.

    Comment

    Working...
    X