Skip to content

Redundant DB queries on every HTML detail request for ETag #213

Description

@chedong

描述

phpMan.php 中每次 HTML 详情请求都执行 2 次 SQLite 查询(meta 表的 search_index_updated 和 cache 表的 emoji 缓存状态),即使命中 304 也不例外。

影响

对于高频读取的 man page 服务,每次请求都增加 2 次 SQLite 查询。

建议

  1. 考虑将 search_index_updated 缓存在 APCu 或共享内存中
  2. 或者将时间戳嵌入响应头,由客户端在 If-None-Match 中带回
  3. 对于 emoji 缓存状态,可以考虑在构建索引时预生成一个清单文件

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions