WordPress.org

Ready to get started?Download WordPress

Forums

Hyper Cache Extended
[resolved] Posts with "wp-" in post_name are not cached (4 posts)

  1. webaware
    Member
    Posted 1 year ago #

    G'day, nice simple and quick plugin, thanks!

    I notice it isn't caching posts/pages with "wp-" in their name. This is because of the following code in cache.php:

    // Do not cache WP pages, even if those calls typically don't go throught this script
    if (strpos($hyper_uri, '/wp-') !== false)
        return false;

    Would it be possible for you to change this test to better match the WP folders? e.g.

    // Do not cache WP pages, even if those calls typically don't go through this script
    if (preg_match('@/wp-(?:admin|content|includes)/@', $hyper_uri))
    	return false;

    cheers,
    Ross

    http://wordpress.org/extend/plugins/hyper-cache-extended/

  2. webaware
    Member
    Posted 1 year ago #

    Thinking about it further, you're probably trying to omit scripts in the website root too. Perhaps this?

    // Do not cache WP pages, even if those calls typically don't go through this script
    if (preg_match('@/wp-.*\.php/@', $hyper_uri))
    	return false;
  3. mlazarov
    Member
    Plugin Author

    Posted 1 year ago #

    Why you need to cache some wp-* ?

  4. webaware
    Member
    Posted 1 year ago #

    I have a couple of pages (about plugins) named "wp-*" so they of course don't get cached. I think since this is really an edge case for your plugin, I'll just use WP Super Cache instead for this website, since it handles "wp-*" pages differently. No need to change anything.

    cheers,
    Ross

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.