Get the most out of your Centmin Mod LEMP stack
Become a Member

Beta Branch fix WordPress Redis page cache TTL from 6h to 21600 seconds and migra…

Discussion in 'Centmin Mod Github Commits' started by eva2000, Dec 3, 2026 at 1:54 AM.

  1. eva2000

    eva2000 Administrator Staff Member

    60,673
    12,636
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +19,303
    Local Time:
    12:51 AM
    Nginx 1.31.x
    MariaDB 10.x/11.4+/12.3+
    fix WordPress Redis page cache TTL from 6h to 21600 seconds and migrate existing vhosts in 140.00beta01

    Redis EXPIRE takes whole seconds, so the "redis2_query expire $key 6h"
    line written by the WordPress Redis page cache generators was rejected
    and cached pages were stored with no TTL.
    https://github.com/centminmod/centminmod/issues/175

    Changes:
    - wpsetup.inc, wpsetup-fastcgi-cache.inc: the /redis-store location in
    rediscache_<vhost>.conf now sets "expire $key 21600" (6 hours)
    - cpcheck.inc wp_config_update: an existing stock rediscache_<vhost>.conf
    that still holds 6h is recognised and rewritten to 21600, with the
    OAuth discovery bypass added where it is missing
    - cpcheck.inc wp_config_update: one subdirectory rule for the Redis and
    the main vhost migration; path parts may hold dots (/release.v2), a .
    or .. part is still refused
    - test-wordpress-config.py: assert both generated TTLs, 6h migration
    cases with and without the OAuth rule and in a dotted subdirectory,
    and the subdirectory rule against accepted and refused names

    Pages already stored without a TTL keep none until they are purged,
    evicted by maxmemory-policy or cached again.


    Continue reading...

    140.00beta01 branch