Skip to content

页面静态化 #107

Closed
Closed
@88250

Description

@88250
Owner

目的

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

处理流程

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

实现细节

  • 存盘目录 ~/.solo/static-cache/
  • 仅在非登录状态生成和使用静态页面
  • 文件压缩存储以节省磁盘空间
  • 生成的静态页面过期时间为 6 小时

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Projects

No projects

Relationships

None yet

    Development

    No branches or pull requests

      Participants

      @88250

      Issue actions

        页面静态化 · Issue #107 · 88250/solo