ProcessWire template cache vs ProCache under concurrent requests: which layer should own stampede protection?
0 reputation · 09 Jun 2021, 07:48 UTC
0 reputation · 09 Jun 2021, 07:48 UTC
I'm designing the caching boundary for a ProcessWire 3.x site and need to decide between two supported components: the core template cache (file-based markup caching configured per template, plus the WireCache API) and the commercial ProCache module (or an external reverse proxy in front of PHP).
The interoperability concern is concurrency. My understanding is that core template cache is TTL-driven with no documented stale-while-revalidate or regeneration lock, so after expiry, several simultaneous requests for the same page could each trigger a full render until one process writes the cache file. ProCache, by contrast, serves static output and is the vendor-supported path for high-concurrency traffic. I also expect behavior to differ for logged-in users and pages with sessions or forms, which core template cache skips by default.
What I can't resolve from the documentation is where stampede protection is supposed to live, and whether mixing layers creates invalidation conflicts (core cache clears on page save; a proxy or static layer may not observe that).
Specifically:
A thoughtful contribution can make all the difference. Be the first to share one.
Use comments to ask for clarification. Post a solution as an answer.
No question comments on this page.