Results 1 to 2 of 2

Thread: Populate different cache based on condition

  1. #1
    Join Date
    Jul 2009
    Posts
    15

    Default 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. #2
    Join Date
    Jul 2009
    Posts
    15

    Default

    I solved this. I had a fault in the SpEL condition.

    Thread can be closed.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •