0

I have method with one input which I use for logging purposes only. How can I use @Cacheable on this method while ignoring the input? (using Ehcache and spring @Cacheable annotation) Thanks

Strelok
  • 50,229
  • 9
  • 102
  • 115

1 Answers1

0

You can configure the @Cacheable annotation with the key attribute and give it a constant value, thus ignoring your input parameter.

See the documentation for details.

Louis Jacomet
  • 13,661
  • 2
  • 34
  • 43