0

I am working with a Spring Boot Application that uses SpEl , it has some Redis annotations and it calls my attention the use of brackets on some expressions, i.e.:

@Cacheable(value = "{mycache}", key = "#param")

I can tell the SpEl expression when using # is to refer to the passed param, but for the first part "{myCache}" I am not sure what is the purpose of the braces.

Eduardo
  • 2,070
  • 21
  • 26
  • The expression `@Cacheable(value = "{mycache}", key = "#param")` means that you are setting the value for `mycache` with `#param`. – Vishwa Ratna May 19 '20 at 14:28
  • Does this answer your question? [@Cacheable key on multiple method arguments](https://stackoverflow.com/questions/14072380/cacheable-key-on-multiple-method-arguments) – Vishwa Ratna May 19 '20 at 14:32
  • what is the source for your answer? I just want to be sure that value for `mycache` is setting the value with `#param`. it does have no sense at all to create a cache per each key, I do not think this is what is doing – Eduardo May 19 '20 at 14:48

0 Answers0