Skip to content

v1.0.11

Choose a tag to compare

@brianvarskonst brianvarskonst released this 27 Oct 23:06
· 20 commits to main since this release
v1.0.11

Nginx Cache 1.0.11 lets responses that send a positive X-Accel-Expires enter the FastCGI cache for the TTL they request, while private responses stay out of it.

  • Positive X-Accel-Expires values are honored. The generated fastcgi_no_cache rule passed $upstream_http_x_accel_expires directly, so any nonzero value prevented storage. Nginx now applies the header's native TTL semantics. X-Accel-Expires: 0, Set-Cookie and the existing bypass rules still prevent caching.
  • Private responses stay out of the cache. A positive X-Accel-Expires overrides Nginx' own Cache-Control checks, so a new $sympress_cache_skip_cache_control map keeps responses with private, no-cache or no-store uncached, including mixed-case and qualified directives.

On upgrade: regenerate the HTTP and FastCGI includes together (wp nginx-cache config --section=http and --section=fastcgi) and reload Nginx. The FastCGI include references the new map from the HTTP include, so nginx -t rejects a mixed pair. Use Nginx 1.23 or newer: older versions only expose the first of repeated upstream Cache-Control headers to the map. Pages that send a positive X-Accel-Expires will now be served from the cache for that TTL. Option names and stored values are unchanged.

Implementation: #52

Release preparation: #53

Release commit: 045aea5183c0ecbad1e430e9fe6fc93507a875ea. The SSH-signed tag was verified locally with the SymPress release key.

Validation: all eight QA checks passed on the fix PR and the release PR, and the post-merge QA run on main passed. Local QA in PHP 8.5 also passed: 116 tests / 583 assertions, coding standards, static analysis and hook checks. A new unit test runs the generated Cache-Control regex against private and public directive samples and fails when the pattern is broken. Real Nginx 1.22 and 1.24 containers confirmed that 1.22 exposes only the first of repeated upstream Cache-Control headers while 1.24 combines them. The ZIP contains the production dependencies and passed checksum and source checks: 2,475 file checksums, 120 source files identical to the tag, and no development packages. Archive build and checks.

Download ns-nginx-cache-1.0.11.zip below for a ready-to-install WordPress package. The automatically generated GitHub source archives do not include the production dependencies. Composer users can update sympress/nginx-cache to ^1.0.11.

SHA-256 for ns-nginx-cache-1.0.11.zip:

84fe0f278fe5dc887575fd58768ddd494a17ecdb6a947687d418f06a45da6401