-
Notifications
You must be signed in to change notification settings - Fork 164
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
期望client-side-caching可以暴露出一个handle来处理过期的缓存 #168
Comments
2881099
added a commit
that referenced
this issue
Dec 14, 2023
cli.Notice += (s, e) =>
{
if (e.NoticeType == NoticeType.Event && e.Log == "ClientSideCaching:InValidate")
{
var keys = e.Tag as string[];
}
};
cli.UseClientSideCaching(new ClientSideCachingOptions
{
//本地缓存的容量
Capacity = 3,
//过滤哪些键能被本地缓存
//KeyFilter = key => key.StartsWith("Interceptor"),
//检查长期未使用的缓存
CheckExpired = (key, dt) => DateTime.Now.Subtract(dt) > TimeSpan.FromSeconds(600)
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
默认是直接删除本地缓存,但是缓存有时不一定是静态数据,而是动态数据,需要做一些更新处理。例如采用动态编译技术实现的动态接口,需要更新后编译到当前环境。
The text was updated successfully, but these errors were encountered: