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

如何读取Cache<String, String>的key列表,并删除指定的key #940

Open
lzming9511 opened this issue Oct 23, 2024 · 1 comment
Open

Comments

@lzming9511
Copy link

`
public Cache<String, String> kvCache;
@PostConstruct
public void init() {
QuickConfig kvQc = QuickConfig.newBuilder("kvCache")
.expire(Duration.ofHours(72))
.cacheType(CacheType.BOTH) // 创建一个两级缓存
.localLimit(500000) // 本地缓存元素个数限制,只对CacheType.LOCAL和CacheType.BOTH有效
.build();
kvCache = cacheManager.getOrCreateCache(kvQc);
}

@async
public void clearKvCacheAsync() {
kvCache.removeAll(*********);//要删除所有的缓存
}

`

@areyouok
Copy link
Collaborator

没有你想要的那种接口

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

2 participants