Support » Fixing WordPress » How does WP Super Cache override the main query loop?

  • Hi folks,

    I’ve actually posted this question on Stack Overflow, but they didn’t have an answer for me. Here’s the question:

    I’m curious about how the WP Super Cache plugin works. It is a plugin that caches certain pages on WordPress so that the server doesn’t have build the page every time it is requested.

    I’ve read around a little about how server-side caching in WordPress works, and I found this post, which says that you can add a filter to ‘posts_request’ hijack and stop the main query (which kickstarts the whole page building in WordPress), and another filter to ‘posts_results’ to insert your own cached page. Between these two filters, you can stop WordPress from building a page from scratch.

    I’ve been pouring through the WP Super Cache scripts though, and I don’t find any filters for these two actions anywhere! Does anyone have any idea of how WP Super Cache hijacks the main post loop?

Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘How does WP Super Cache override the main query loop?’ is closed to new replies.