Can I specify the cache name in @Cacheable annotation dynamically
Hi there,
Is it possible for me inject (not sure if it's the right word) cache names into @Cacheable annotation, so instead of having the hard code the cache names:
Code:
@Cacheable({ "book","isbn"})
public Book findBook(ISBN isbn) {...}
I can do something like:
Code:
@Cacheable({ #cacheName1, #cacheName2})
public Book findBook(ISBN isbn) {...}
where cachename1, and cacheName2 can be provided from a properties file, and inject into the code. Is this doable at all?
Thanks,
David