Announcement Announcement Module
Collapse
No announcement yet.
CacheEvict using wildcards Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • CacheEvict using wildcards

    Hi,

    Is there any way of using wildcards in @CacheEvict?

    I have an application with multi-tenancy that sometimes needs to evict all the data from the cache of the tenant, but not of all tenants in the system.

    Consider the following method:
    Code:
    @Cacheable(value="users", key="T(Security).getTenant() + #user.key")
    public List<User> getUsers(User user) {
        ...
    }
    So, I would like to do something like:

    Code:
    @CacheEvict(value="users", key="T(Security).getTenant() + *")
    public void deleteOrganization(Organization organization) {
        ...
    }
    Is there anyway to do it?

  • #2
    Did you find a solution to this? I have the same need.

    Comment


    • #3
      Originally posted by ckstettler View Post
      Did you find a solution to this? I have the same need.
      Unfortunately, no. Nobody responded and I couldn't find a solution myself.
      I'm still looking for an solution ;\

      Comment

      Working...
      X