My finding was wrong: the cache is invalidated because it's created thanks to the UnboundedEntityCacheManager with the flag invalidateOnUpdate so each time the doc of the toggleable filter is updated the cache is invalidated: we don't need a manual call to invalidation. Note that the fact we don't invalidate it manually is covered in a test. |