Skip to content

Caching Optimization

Prize competitions require high real-time accuracy (available tickets count, remaining stock, and countdown timers) while serving thousands of concurrent users.

  • 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.

In your caching plugin (WP Rocket, LiteSpeed, W3 Total Cache, Fastly, or Cloudflare APO):

Ensure pages are not served from cache when the customer has items in cart:

  • woocommerce_items_in_cart
  • wp_woocommerce_session_*
  • /cart/*
  • /checkout/*
  • /my-account/*
  • Stream Overlay endpoints (/?qcw_stream_overlay=*)
  • Live Draw endpoints (/?qcw_live_draw=*)

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.