alibaba / alibaba/jetcache

是否可以提供列出所有region(Area)的 cachekey, 再提供一个手动清除key (全部节点清除)的方法。

Open
#760 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Java
Stars
5.6k
Forks
1.1k
PR merge metrics
No merged PRs in 30d

Description

在使用jetcache时,开启remote及多级缓存 。
由于配置了一些缓存key,value,但因为业务原因,需要提前变更,重新刷新后使用的新的配置。
虽然提供了@CacheRefresh,但时间是写死的。在刷新时间内,仍有本地脏缓存数据。
另一个@CacheInvalidate 也需要新写一个方法。比较麻烦。 于是,遇到以上问题,我们现在就是删除redis数据,重启每个服务。
希望提供2个方法,供手动列出并删除:
GetAreaCacheKeys(... keys);
invalidateCacheArea(... keys)

或是否有其他更简单的方法?

by the way :像我们之前没转jetCache之前使用的 j2Cache 就有一个CacheChannel可以总管所有L1+L2对象key,value
可以将所有的area,及area下的key,全列出来,并可以指定某些key 通过redis topic/channel 将所有实例机器内存,及redis上的清除掉。

Contributor guide

No contributing guide indexed for this repository

Research direction

The issue names no files, tests, or entry points. Start by reading JetCache's remote and multi-level cache APIs, focusing on how cache areas and keys are represented across local caches and Redis. Done should provide a defined way to list area keys and invalidate selected keys across all nodes, or document why another approach is preferable.

Written by the indexing model from the issue text.

Assessment

Tech stack
java, redis
Domain
backend, distributed-systems
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.