Compare commits

...
1 Commits
Author SHA1 Message Date
shadowdaoandClaude Sonnet 5.5 0180aacd72 Progress route: opt out of LiteSpeed cache via its hook
Test and Release / test (push) Successful in 2m26s
Test and Release / release (push) Successful in 15s
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0185ukXhhC8xipsBR7e3o76i
2026-11-16 08:37:10 -08:00
+3 -1
View File
@@ -85,7 +85,9 @@ final class DonateController {
$res = rest_ensure_response( self::progress_for( $goal ) );
// Short shared cache lets a CDN collapse bursts; the page JS adds a cache-busting parameter after a donation.
$res->header( 'Cache-Control', 'public, max-age=10, s-maxage=10' );
$res->header( 'X-LiteSpeed-Cache-Control', 'no-cache' ); // LiteSpeed would otherwise hold REST responses for days
// LiteSpeed Cache would otherwise hold REST responses for days; it has its own opt-out hook.
do_action( 'litespeed_control_set_nocache', 'streamgoals progress' );
$res->header( 'X-LiteSpeed-Cache-Control', 'no-cache' );
return $res;
}