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

页面静态化 #107

Closed
88250 opened this issue Apr 13, 2020 · 0 comments
Closed

页面静态化 #107

88250 opened this issue Apr 13, 2020 · 0 comments
Assignees
Milestone

Comments

@88250
Copy link
Owner

88250 commented Apr 13, 2020

目的

页面静态化有助于减少后端压力,并将前台访问时的响应速度提升到极致。

处理流程

  • 第一次访问前台某 URL 时生成静态 HTML 页面文件并存盘
  • 后续访问该 URL 时先从磁盘读取 HTML 页面文件,不存在的话再走动态处理
  • 后台发布、更新、删除等数据写入操作后清空整个静态页面目录

实现细节

  • 存盘目录 ~/.solo/static-cache/
  • 仅在非登录状态生成和使用静态页面
  • 文件压缩存储以节省磁盘空间
  • 生成的静态页面过期时间为 6 小时
@88250 88250 added this to the 4.1.0 milestone Apr 13, 2020
@88250 88250 self-assigned this Apr 13, 2020
88250 added a commit that referenced this issue Apr 14, 2020
88250 added a commit that referenced this issue Apr 14, 2020
88250 added a commit that referenced this issue Apr 14, 2020
@88250 88250 closed this as completed Apr 14, 2020
88250 added a commit that referenced this issue Apr 14, 2020
88250 added a commit that referenced this issue Apr 15, 2020
88250 added a commit that referenced this issue Apr 17, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant