Failure to Set Up vBulletin Cache

Discussion in 'LiteSpeed Cache' started by ShannonA, Jan 23, 2014.

  1. ShannonA

    ShannonA Member

    I've been trying to set up the vBulletin cache in accordance with the instructions here:
    http://blog.litespeedtech.com/2011/01/28/speed-up-vbulletin-sites-through-litespeed-built-in-cache/

    FIRST problem, the Rewrite rules don't seem to work right.

    I put them in as follows for our site at "forum.rpg.net":
    When I do so, I don't get any results from my log files, even when I turn debugging up to '9' and INFO logging on. Then, I delete this line:
    And things start logging correctly ... which implies to me that there's something very wrong with that line, but I can't figure out what.

    Even when I have that line temporarily removed (for testing only, as clearly the site wouldn't work well with it missing!), caching doesn't seem to work. I look at my caching directory and there's nothing there, and I don't see the X-Litespeed-Cache headers.
    (The user with permissions matches the web server.)

    Despite that, I do see this sort of thing logging (while I have that bad line out):
    So any ideas on how to fix these two problems?

    This is vB 4.2.2; has the cache stopped working after 4.0?

    Main Cache Setting:
    Virtual Host Cache Setting:
    Last edited: Jan 23, 2014
  2. ShannonA

    ShannonA Member

    I figured this one out. There's a typo on the explanation page. This:
    Should be this:
    (e.g., there was an extraneous space)

    If that could be fixed for future cachers, that'd be great.

    As for the lack of caching, I just realized that every attempt to cache ends with an error. Ah hah! I can't tell what it means though because it doesn't show the full info ...
    Any ideas what this might be hinting at?
  3. ShannonA

    ShannonA Member

    I turned on caching for the whole server (unclear to me if that was meant to be one of the requirements or not, as it's not explicited listed in the instruction pages) and caching did occur for other subsites, but not for the forums set up as above. So, the base caching setup looks OK, but the caching still isn't occurring due to those rewrites ...
  4. ShannonA

    ShannonA Member

    And the SECOND problem looks to be another problem with the Rewrite rules as listed.

    Something about this is funky, and was causing the unknown files:
    I rewrote it by hand to get rid of any hidden spaces or weird characters, and also brought it up to date with modern vBulletin (which tends to have SEO stuff at the end of a URL, rather than ending with .php). I came up with the following:

    It's now caching, but at a much lower rate than I'd expect. Does this look good, or am I still missing something?
  5. ShannonA

    ShannonA Member

    And the problems continue.

    When I got things running, suddenly some people who were logged in were getting their pages cached, despite the inclusion of the aforementioned rules.

    I discovered that the listing isn't in sync with the xml file for vBulletin. The xml files creates 'imloggedin' while the RewriteRules look for 'bbimloggedin'.

    However even after that fix *some* people seemed to be getting pages cached when they were logged in.

    So I dug up the "header('X-LiteSpeed-Cache-Control: no-cache')" response header, and I tried to put it in ... but it never shows up. I know it's not my coding because creating the imaginary ""header('X-LiteSpeed-Cache: no-cache')" works fine, but as soon as I add on the "-Control" none of my response header reporting apps see it any more.

    Sadly, I'm about to give up with all the errors in the documentation and the frustration with it then caching incorrectly, on top of everything!
  6. NiteWave

    NiteWave Administrator

    I'll update the blog after confirming with your case.
    Sorry for having troubled you so much.

    the rewriterule
    please remove the "L" flag, i.e.,
    and, if these rules are put in .htaccess, need change to
    this is because of apache's per-server and per-directory rewriterule difference.

    for cookie name bbimloggedin/bbuserid/bbpassword, the "bb" is prefix, added by vBulletin and configurable, your setting may vary. in firebug, can check what it is for your vB.

    for testing purpose, you can just enable cache for 1 URL only first, for example, the homepage of the forum. just change the rewriterule to
    (assume you put these rules in .htaccess)
  7. ShannonA

    ShannonA Member

    Testing just on the front page sounds like a great idea; thanks.

    (I've been using the Rewrite area of the Virtual Host panel in the LSWS admin pages, so what would be the best Rewrite rule for just the front page of http://forum.rpg.net, which doesn't have a /forum/ directory.)

    PS: Would love any ideas on why I can't create a header('X-LiteSpeed-Cache-Control: no-cache') header; I even put that in just plain PHP, and it doesn't work!
  8. NiteWave

    NiteWave Administrator

    should be
    it works but for internal communication only, between litespeed process and lsphp process, not intend to show up in final response headers.
  9. ShannonA

    ShannonA Member

    Ah, well that explains the super-weirdness! Just have to take it on faith that it's there?

    Thanks!

Share This Page