-
Dec 12th, 2011, 06:20 AM
#1
@Cacheable using a static string
Hi,
I'm using @Cacheable but to avoid conflicts, I need to use a unique identifier in the cache key. I would like to use a string but I keep getting errors on this such as:
EL1008E
pos 14): Field or property 'x' cannot be found on object of type 'org.springframework.cache.interceptor.CacheExpres sionRootObject'
These are the expressions I'm trying to use
@Cacheable(value="products",key="'x' + #cat.id")
where x is a random String I chose.
Can anyone explain how to use "static identifiers" in a cacheable key?
Kind regards,
Marc
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules