Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

使用@CacheInvalidate失效缓存时,可以通过key前缀批量删除吗 #827

Open
zhaojinhua123 opened this issue Oct 12, 2023 · 4 comments

Comments

@zhaojinhua123
Copy link

使用@CacheInvalidate失效缓存时,可以通过key前缀批量删除吗

@areyouok
Copy link
Collaborator

不能通过前缀删除

@lemonschen
Copy link

@areyouok 修改或删除一个实体时,可以清除key为实体ID的详情缓存,那分页条件查询列表的缓存只能单独用写代码清除吗?

@areyouok
Copy link
Collaborator

jetcache提供了 api,你可以自己来实现。办法很多,比如更新以后你只要换个key前缀就可以了,分布式环境下可以把这个前缀也存到 cache 里面。

@lingfengcoder
Copy link

使用@CacheInvalidate失效缓存时,可以通过key前缀批量删除吗

可以看看我fork出来并增强的版本,支持批量删除
image
坐标:https://github.com/lingfengcoder/jetcache/tree/2.7.8-GM-SNAPSHOT

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants