[solved] vBulletin + LiteSpeed Cache

Discussion in 'LiteSpeed Cache' started by andych, May 12, 2013.

  1. andych

    andych New Member

    Last edited by a moderator: May 14, 2013
  2. NiteWave

    NiteWave Administrator

  3. andych

    andych New Member

    Hi NiteWave,

    I also had tried the 2 URLs you gave me above, but I was unable to find the vBulletin Plug-Ins.

    And is that works only for guest caching? What about members after they logged-in? Are they cached as well?

    [​IMG]
  4. eva2000

    eva2000 Member

  5. andych

    andych New Member

    Thanks George, glad to see you here :D

    Btw, that works only for guest caching? What about members after they logged-in? Are they cached as well?

    I already have X CACHE, is there any issues with it?
    Last edited: May 13, 2013
  6. NiteWave

    NiteWave Administrator

    >I already have X CACHE, is there any issues with it?
    xcache is php opcode cache, not relate with litespeed page cache at all.

    >Btw, that works only for guest caching? What about members after they logged-in? Are they cached as well?

    you can try to cache all pages including logged-in user, as long as logged-in user has no objection. however, when a user want to read his private messages, but read other user's private message since it's cached? when he want to edit his profile, but see other's profile ? etc.
  7. andych

    andych New Member

    I tried the steps above but the cache hits always 0%. Any clue?
  8. NiteWave

    NiteWave Administrator

    to play with cache, you can try to cache one page, e.g., phpinfo.php

    if you fail to cache this page, PM me your server's access info, I can take a quick look.
  9. andych

    andych New Member

    @NiteWave:

    PM Sent!
    with credentials :)

    ---

    @eva2000:

    Is that for LiteSpeed Cache or Varnish?

    [​IMG]
    Last edited: May 13, 2013
  10. NiteWave

    NiteWave Administrator

    the cache works now, please test:
    www.yourdomain.com/test.php

    what I changed:
    virtual hosts->yourdomain->Rewrite->Enable Rewrite:No ==> Yes

    and added one line in Rewrite Rules:
    RewriteRule /test.php - [L,E=Cache-Control:max-age=120]

    in response header, can see
    X-LiteSpeed-Cache:hit
  11. andych

    andych New Member

    Is that only works for test.php and not the vBulletin files?

    Have you tested the vBulletin Forum, is it cached?
  12. NiteWave

    NiteWave Administrator

    not yet. I need you confirm if cache for /test.php works fisrt.
  13. andych

    andych New Member

    I don't think it hits the cache.

    [​IMG]
    Last edited: May 13, 2013
  14. NiteWave

    NiteWave Administrator

    Total Cache Hits: 6

    then how do you know if a page is cached or not ?
  15. andych

    andych New Member

    Firebugs header about cache hits: miss.
  16. NiteWave

    NiteWave Administrator

    cached page in firebug, should have response header:
    X-LiteSpeed-Cache:hit

    the rewrite rules better put in DocumentRoot/.htaccess,
    mixed with vBulletin's current rewrite rules.

    now you put those rules in virtual host's rewrite section.
  17. andych

    andych New Member

    Now I uncomment your commented rules at litespeed admin -> vhost -> rewrite.

    And moved them to .htaccess so it's look like this:

    [​IMG]

    Then commented your given rules at ls admin:

    [​IMG]

    But then I checked with Firebugs for the homepage:

    [​IMG]

    And for the test.php also seems not cached as well:

    [​IMG]

    Which 'should be' cached with the rule of RewriteRule /(.*\.php)?$ ?^?^? [E=Cache-Control:max-age=120] that I put on .htaccess (refers 1st image of this post)

    ---

    Update:

    Real-Time Statistics also returned seems not caching at all:

    [​IMG]
    Last edited: May 13, 2013
  18. NiteWave

    NiteWave Administrator

    1. since you don't use virtual host level rewrite now, you can change back Enable Rewrite:Yes->No

    2. what's the ?^?^ in this line?
    RewriteRule /(.*\.php)?$ ?^?^ [E=Cache-Control:max-age=120]
    please change it to
    RewriteRule (.*) - [E=Cache-Control:max-age=120]
  19. andych

    andych New Member

    1. DONE!
    2. After I fix, the cache working but people A getting people B's session, how do I fix this issue?
  20. NiteWave

    NiteWave Administrator

Share This Page