framework icon indicating copy to clipboard operation
framework copied to clipboard

建议请求缓存$tag也像请求缓存$key一样,允许变量替换

Open wxkxklmyt opened this issue 4 years ago • 0 comments

https://github.com/top-think/framework/blob/0b5fb453f0e533de3af3a1ab6a202510b61be617/src/think/middleware/CheckRequestCache.php#L102

业务场景: 网站有WAP和WEB端,后台更新文章的时候需要同时清除WAP和WEB端的请求缓存,假设缓存标签为article_1。 存在两个问题: 1、现有的情况是缓存标签不支持像请求缓存KEY那样支持变量替换。 2、请求缓存的标签不支持设置过期时间,现在的请求缓存标签过期时间为永久有效,建议请求缓存标签的有效期和请示缓存KEY的有效期一致。

wxkxklmyt avatar Jul 23 '21 02:07 wxkxklmyt