I have two annotations on my method :
@Profiled(tag = "XXX") ( // provided by perf4j
@Cacheable(unless="takesLong") // provided by spring
public String cacheResultsIfTakesLong() {
My aim is to cache the results of cacheResultsIfTakesLong method only if its takes longer than a specified time to execute. Is there a way to pass the execution time calculated during processing of '@Profiled' annotation to be used in 'unless' attribute ?
Aucun commentaire:
Enregistrer un commentaire