Hello,
I have two methods in my class like this:
When I start the app, the SpringCacheAnnotationParser parser is never called to process the CacheEvict annotation (method: public Collection<CacheOperation> parseCacheAnnotations(AnnotatedElement ae) )Code:@Cacheable("mycache") @Transactional(readOnly = true) public SearchResultDTO<PromotionDTO> getPromotions(int startIndex, int pageSize, ....){ ..... } @CacheEvict(value = "mycache", allEntries = true) @Transactional(readOnly = false) public void deletePromotion(String applicationId, Long promotionId) { ..... }
If I change my code and remove the Cacheable annotation, the parser processes the CacheEvict annotation properly.
Is this a bug or a framework restriction?
Regards,
Juan


Reply With Quote