Caching Optimization
Prize competitions require high real-time accuracy (available tickets count, remaining stock, and countdown timers) while serving thousands of concurrent users.
Page Caching Guidelines
Section titled “Page Caching Guidelines”- Dynamic AJAX Endpoints: Quantum Competitions fetches ticket grid states and live countdown checks via nonces and lightweight AJAX endpoints, allowing product pages themselves to remain cached.
- LiteSpeed Cache Integration: The plugin automatically issues targeted cache purges (
litespeed_purge_post) whenever a ticket is purchased or a competition ends.
Cache Exclusion Rules
Section titled “Cache Exclusion Rules”In your caching plugin (WP Rocket, LiteSpeed, W3 Total Cache, Fastly, or Cloudflare APO):
Exclude Cookies:
Section titled “Exclude Cookies:”Ensure pages are not served from cache when the customer has items in cart:
woocommerce_items_in_cartwp_woocommerce_session_*
Exclude URLs from Full-Page HTML Caching:
Section titled “Exclude URLs from Full-Page HTML Caching:”/cart/*/checkout/*/my-account/*- Stream Overlay endpoints (
/?qcw_stream_overlay=*) - Live Draw endpoints (
/?qcw_live_draw=*)
Redis / Memcached Object Caching
Section titled “Redis / Memcached Object Caching”High-volume ticket drops benefit significantly from persistent object caching:
- Install Redis Object Cache or Memcached Object Cache.
- Ensure Redis connection has low latency (< 1ms).
- Frequent lookups for competition status and ticket counts hit RAM instead of disk queries.