WordPress.org

Ready to get started?Download WordPress

Forums

WP-Cache: Do not cache the index page (20 posts)

  1. Lester Chan
    Member
    Posted 7 years ago #

    Any idea how not to make WP-Cache not cache the very first page of your wordpress. I can't seem to figure what to put in the "Rejected URIs" field.

  2. Lester Chan
    Member
    Posted 7 years ago #

    bumpy bump anyone?

  3. WPChina
    Member
    Posted 7 years ago #

    That's a great question. In the past I too tried different things like "index.php" or even just a slash like "/". I can't figure it out either.

  4. Lester Chan
    Member
    Posted 7 years ago #

    i thought is /, but all URL have / in them, so it will not cache all. And they say not to put filename either, so index.php is out.

  5. Lester Chan
    Member
    Posted 7 years ago #

    bumpy bump

  6. WPChina
    Member
    Posted 7 years ago #

    Does anyone have an idea about this?

  7. Lester Chan
    Member
    Posted 7 years ago #

    I got a way around this but requires hacking the core file.

  8. AskApache
    Member
    Posted 7 years ago #

    Ok there is a fix: Stop WP-Cache from caching the index page, its just changing 1 line in 1 file..

    [ OPEN ] wp-content/plugins/wp-cache/wp-cache-phase2.php
    [ FIND ] if (strstr($uri, ‘/wp-admin/’))
    [ REPLACE WITH ] if(strstr($uri,’/wp-admin/’) || $uri===’/’ || strstr($uri,’/index.php’))

  9. Lester Chan
    Member
    Posted 7 years ago #

    okie you beat me to it.

  10. WPChina
    Member
    Posted 7 years ago #

    Thanks! resolved... ;-)

  11. dj-primat
    Member
    Posted 6 years ago #

    Hello!
    can you please help me with wp-cache plugin?
    i need to exclude posts (single.php) from caching couse i have dynamic custom fields in it. i can pay e-gold if you can help me.

  12. dj-primat
    Member
    Posted 6 years ago #

    nobody knows how to do that?!

  13. Samuel Wood (Otto)
    Tech Ninja
    Posted 6 years ago #

    How you do that largely depends on what sort of permalinks you use. Post a link to your site so we can look at it and tell you.

  14. dj-primat
    Member
    Posted 6 years ago #

    every post on my site have list http://mysite.com/post1/ http://mysite.com/post1/ and so on. i know that i can exclude every post in wp-cache by typing all links to my post, but its very long time to do that 'couse i have more then 1000 posts in my blog.

  15. dj-primat
    Member
    Posted 6 years ago #

    p.s. links in post above just for example, mysite.com its not my site :)

  16. Samuel Wood (Otto)
    Tech Ninja
    Posted 6 years ago #

    That really doesn't tell us anything. We need actual examples. Is "post1" actually post + the id number of the post, or is it the post-slug? It's hard to guess from your example.

    Just post a link to your site. It's simpler all around.

  17. dj-primat
    Member
    Posted 6 years ago #

    "post1" its post slug.

    wordpress is installed at my home network i can't post link 'couse its impossible to view site via internet.

  18. Samuel Wood (Otto)
    Tech Ninja
    Posted 6 years ago #

    its post slug.

    Well, then what you want is not possible. Sorry. There's no way to recognize a single post URL when you don't have anything unique to that URL. If you were using a more common permalink config, then there might be a way, but if all you're using is %postname%, then there's no solution.

  19. csautot
    Member
    Posted 6 years ago #

    Another question I have that relates to this is whether it is possible to exclude a range of URIs from being cached?

    Say I want http://www.domain.com/gallery/ to be cached, but I do not want http://www.domain.com/gallery/####/ to be cached (with #### being a 4-digit random number). And say I have 100 of these http://www.domain.com/gallery/####/ pages that I don't want cached. With WP-Cache, if you say don't cache /gallery/ it will also not cache pages that are children to this URI segment. Is there maybe a way to use a wild-card character with the plugin settings? Say, something like: do not cache /gallery/*

  20. csautot
    Member
    Posted 6 years ago #

    and I know you could do something where you say don't index:

    /gallery/1
    /gallery/2
    /gallery/3
    ...

    but I just mentioned using numbers as an example. Would really like to figure out if it is possible to use a wild-card character with the rejected URIs list.

Topic Closed

This topic has been closed to new replies.

About this Topic