ab
V2EX  ›  问与答

fastcgi_cache 有没有办法为网站每个子目录单独设置缓存路径?

  •  
  •   ab · Apr 28, 2020 · 1532 views
    This topic created in 2230 days ago, the information mentioned may be changed or developed.
    目前删除缓存是暴力清除全站缓存,会造成瞬间高载。

    但业务多数情况只需要删除某个子目录
    2 replies    2020-04-28 21:36:53 +08:00
    ab
        1
    ab  
    OP
       Apr 28, 2020
    WordPress 环境

    fast_cache 以 md5 值保存文件,真是爱莫能用。当文章众多,访问量大的时候。如果暴力删全站缓存会造成瞬间高载。

    理想的模式是当发布或编辑文章时,删除跟这个文章有关的页面(比如首页的分页,TAG 页面,分类页面,文章的分页页面)。如果以缓存以目录保存就很容易批量删除,但是这个 fast_cache 一般是以受访地址的 MD5 哈希值保存,删除缓存的脚本能写断手。
    justseemore
        2
    justseemore  
       Apr 28, 2020
    lua 自己撸一份?
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   2805 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 28ms · UTC 03:54 · PVG 11:54 · LAX 20:54 · JFK 23:54
    ♥ Do have faith in what you're doing.