@CacheEvict used to support an array of cache-names as value which is no longer possible
- Dominant language
- Groovy
- Stars
- 2.9k
- Forks
- 975
- Avg merge
- 1d 22h
- Merged PRs (30d)
- 92
Description
If an invocation of a method results in multiple caches to be cleared, the following was possible using v`1.1.8` of this plugin.
`@CacheEvict(value=[StatisticsService.SERVICE_STATISTICS_CACHE, StatisticsService.DETAILED_TRANSFER_STATISTICS_CACHE, StatisticsService.GENERAL_STATISTICS_CACHE], allEntries=true)`
Now it's throwing an exception as the `cacheNameException` is being cast to an `ConstantExpression` (`ConstantExpression cacheNameExpression = (ConstantExpression)ScriptBytecodeAdapter.castToType(annotationNode.getMember("value"), ConstantExpression.class);`)
Contributor guide
Research direction
Start with the cache eviction annotation handling around the ConstantExpression cast in the issue, then compare its behavior with version 1.1.8. Verify that an array supplied through @CacheEvict.value can clear multiple caches with allEntries=true; the payload names no source file or test to run.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- groovy
- Domain
- backend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100