alist
alist copied to clipboard
希望可以在页面上手动清理缓存
Please make sure of the following things
- [X] I have read the documentation.
- [X] I'm sure there are no duplicate issues or discussions.
- [X] I'm sure this feature is not implemented.
- [X] I'm sure it's a reasonable and popular requirement.
Description of the feature / 需求描述
为了尽可能不占用服务器端资源, 我在服务器和本地环境各维护了一个实例, 两者共用同一台mysql数据库, 但是在其中一端对文件的改动, 不会实时同步到另一端, 经翻看源码发现是缓存读取导致的, 希望可以优化一下
Suggested solution / 实现思路
可以在页面上增加一个清除缓存的按钮, 或者更改现在的刷新按钮
Additional context / 附件
No response
Thanks for opening your first issue here! Be sure to follow the issue template!
刷新不就是清除缓存?
刷新不就是清除缓存?
刷新按钮好像对服务器端缓存无效
这个文件夹已经被我在服务器端删掉了, 可是我通过本机5244端口登陆上去, 列表中仍然存在这一纪录, 后台管理页面无此问题
https://github.com/alist-org/alist/blob/3e9c38697d297d2067508d4789950c733de2fb0d/internal/db/meta.go#L37 可能是这个地方导致的, 读取的是自身的缓存, 但其他实例已经将数据库中的纪录更改了
是否能够考虑支持redis缓存, 并提供自定义配置, 而不是使用go-cache基于内存的缓存, 这样就可以在多个实例中共享缓存了
这个就是用于清理服务端缓存的。
你pin出的代码是数据库的缓存, 与文件列表无关。
不是所有人都会使用redis,也很少有人为了使用此程序专门去搭建redis,内存缓存是更加合理的选择。
这个就是用于清理服务端缓存的。
你pin出的代码是数据库的缓存, 与文件列表无关。
不是所有人都会使用redis,也很少有人为了使用此程序专门去搭建redis,内存缓存是更加合理的选择。
我所说的问题就是数据库缓存, 两台部署了alist的机器, 内存缓存无法共享, 进而导致了我在A实例上对数据库的更改无法在B实例中同步. 我想出了三种方案:
- 提供redis缓存支持, 并支持自定义
- 刷新按钮同时也清除数据库缓存, 不过这样可能会影响效率
- 在后台管理页面新增按钮, 清空数据库缓存
无此计划 不过欢迎pr。
这是要把alist改成无状态啊
Hello, this issue has been inactive for more than 30 days and will be closed if inactive for another 30 days.
Hello @, this issue was closed due to inactive more than 60 days. You can reopen or recreate it if you think it should continue.