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

【提案】 dwebdapp 加入 data/cache 文件夹的支持 #207

Open
Gaubee opened this issue Aug 12, 2024 · 0 comments
Open

【提案】 dwebdapp 加入 data/cache 文件夹的支持 #207

Gaubee opened this issue Aug 12, 2024 · 0 comments

Comments

@Gaubee
Copy link
Contributor

Gaubee commented Aug 12, 2024

在安装包中的 /data 目录,在安装阶段直接拷贝到应用的“数据目录file:///data/”下面。
在安装包中的 /cache 目录,在安装阶段直接拷贝到应用的“数据目录file:///cache/”下面。

这样可以在启动阶段附带一些可读写的数据。
比如在我们 pwa 应用的垫片中,我们可以预先下载 sw 中 cache 的文件, 将它放到 /cache/files/v1.0.0 目录下,后续发现应用更新了,那么就下载到 /cache/files/v1.1.0 目录下,然后更新索引即可。同时因为是 /cache ,所以可以通过清理缓存来更新pwa应用

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

No branches or pull requests

1 participant