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

feat: support the music cache limit #129

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

rapiz1
Copy link
Contributor

@rapiz1 rapiz1 commented Sep 8, 2021

Add an option to support the music cache limit. The least recently accessed cache will be deleted.

Resolves: #44

@rapiz1 rapiz1 changed the title feat: support the music cache limit WIP: feat: support the music cache limit Sep 10, 2021
@rapiz1 rapiz1 changed the title WIP: feat: support the music cache limit feat: support the music cache limit Sep 10, 2021
@rapiz1
Copy link
Contributor Author

rapiz1 commented Sep 28, 2021

出于不知道的原因,这个 PR 会导致设置定期重置,感觉是读取设置如果不存在则使用默认值那里写的有问题

@rocka
Copy link
Member

rocka commented Nov 6, 2021

我觉得还是应该尽量避免使用 fs.readFileSyncfs.readFileSync 来操作配置文件,或者只在应用退出的时候写入一次配置文件。但这里如果不用 read sync , src/main/api/index.js 中初始化 cache 的时候就没法知道用户设置的缓存大小 ... 所以我觉得整个初始化逻辑都要改掉(其实我已经偷偷重构了很久了,只不过不兼容的修改太多,还没能完全实现现有版本的所有功能)。

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

Successfully merging this pull request may close these issues.

[Feature Request] 限制缓存的大小
2 participants