I want to annotate my method with @Cacheable
and also with @Timed
(from micrometer).
But I would like the @Timed
to be applied only in case when the data is not timed.
Is there a way to do that, is it enough to put the annotations in correct order - and which order would that be?
My @Timed
is also using TimedAspect
, not sure if that is relevant.
Right now I do it like below:
@Cacheable
@Timed
public String getValue(long id) {
...
}
I couldn't find any documentation for @Cacheable
that would discuss this.