WordPress.org

Ready to get started?Download WordPress

Forums

How do I re-enable caching? (10 posts)

  1. IIIIIIIV
    Member
    Posted 8 years ago #

    Somewhere in the WP install is instructions to apache to disable caching. I cannot find them anywhere in the theme files or the wp- files themselves.

    apache sends out Pragma: no cache and Cache-Control headers and I'm curious to know where WP is telling apache to do this?

  2. IIIIIIIV
    Member
    Posted 8 years ago #

    Bump, anyone?

    It's silly that people (including me) need to download nearly everything any time they visit simply because of the nutcase way caching is (not) addressed.

  3. Chris_K
    Member
    Posted 8 years ago #

    If you have define('DISABLE_CACHE', true); in your wp-config.php you can just remove it.

  4. IIIIIIIV
    Member
    Posted 8 years ago #

    That's a negatory, ace. No such thing in my wp-config.php file.

  5. marke1
    Member
    Posted 8 years ago #

    Depends on where you see those headers coming out. You didn't mention. In my own tests with caching (in standalone PHP apps, e.g. I didn't mod WP caching) I found that if I write my own headers then the browser obeys. So for example, if you see Apache reporting that its config is no-cache then as far as I know (per my own tests) that's all right as long as the app itself writes its own cache instruction headers. Make sense? See php.net for details on the "header" function, if you need to.

  6. IIIIIIIV
    Member
    Posted 8 years ago #

    Depends on where you see those headers coming out. You didn't mention.

    Everywhere in my /blog/ hierarchy.
    See this screenshot Note the expiry date that's 22 years ago...

    No other part of my site does this or issue those headers, just the blog. The other parts of my site are either SSI or perl and neither do this.

    I know enough about the way apache works to know it wouldn't be issuing cache-control and pragma headers unless it was instructed to so. Neither my perl nor SSI parts of my site do this, so why does WP?

    What you're asking me to do is issue a header() instruction to stop apache from issuing no cache headers it *shoudn't* be issuing in the first place. A bandaid to fix a broken bandaid...

  7. Chris_K
    Member
    Posted 8 years ago #

    Ah, I thought you were referring to WP 2.x's builtin (limited) serverside caching, not the headers. My mistake and apologies (I enjoyed the "Ace" comment though - been 30 years since I was last called ace!).

    Quick side question: My firefox "Page Info" doesn't show headers. Is that an extension? I'd like to compare some other sites to see if they are the same as what you are seeing.

  8. IIIIIIIV
    Member
    Posted 8 years ago #

    The ace bit is a quote from the game Wing Commander IV and the Headers part sure is an extension.

    http://livehttpheaders.mozdev.org/

  9. Chris_K
    Member
    Posted 8 years ago #

    Well, I can confirm that I see the same headers from my own blog for what that's worth (not much, I know). I haven't a clue as to how a fella would change 'em though.

  10. IIIIIIIV
    Member
    Posted 8 years ago #

    Well, now that I read
    http://www.mnot.net/cache_docs/
    I may be asking too much for my blog to be cached. It looks like it is by design, because a) it's a dynamically generated site and b) it sets cookies which cancel out staleness info.

    It turns out apache is setting an E-Tag for my pictures and stuff, just not the textual content...

    http://www.ircache.net/cgi-bin/cacheability.py
    Run your blog's URL through that and you'll see what I mean.

    So, I've probably made a storm in a teacup here - much ado about nothing. :)

Topic Closed

This topic has been closed to new replies.

About this Topic