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
Asked
Active
Viewed 43 times
0

Strelok
- 50,229
- 9
- 102
- 115

cookie monster
- 11
- 2
1 Answers
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
-
Thanks! I will try it. – cookie monster Sep 13 '17 at 14:31