Reputation: 17647
I´m running into a problem where using the @CacheInvalidate annotation is not enough anymore.
One method has to erase two different caches, one of them uses two of the given arguments and the other uses all three.
@CacheInvalidate(cacheName = "cache-with-two-identifiers")
@CacheInvalidate(cacheName = "cache-with-three-identifiers")
public void doSomething(@CacheKey String identifier, @CacheKey String anotherIdentifier, String aThirdIdentifier){
}
The @CacheKey annotated arguments are used for the cache with two identifiers, so I cannot annotate the third argument as well, but it would be required to match the keys of the cache-with-three-identifiers.
The only solution I see so far is programmatically clearing the third-arg-cache within the method itself. How would you do that in Quarkus?
Upvotes: 1
Views: 3552
Reputation: 5562
There is currently no programmatic caching API for Quarkus. There is already an open issue for it, you can +1 for it and provides feedback: https://github.com/quarkusio/quarkus/issues/8140
Upvotes: 1