LSCache For vBulletin?

Discussion in 'vBulletin (Rewrite Based)' started by Deepblue, Jan 19, 2017.

  1. Deepblue

    Deepblue Active Member


    Is there any way to make LSCashe compatible with vBulletin?

    I've found and article from LSBlog but it was a very old article and seems outdated because i've failed to success though i followed all the necessary steps correct.

    Thanks in advance.
    Best Regards.
  2. NiteWave

    NiteWave Administrator

    Deepblue likes this.
  3. Deepblue

    Deepblue Active Member

    litespeed_cache.xml imported through admincp, content of the plugin:

    <?xml version="1.0" encoding="ISO-8859-1"?>
    <product productid="lswscache" active="1">
            <title>Litespeed Caching</title>
            <description>settings to make Litespeed page cache working right</description>
            <url />
            <versioncheckurl />
                    <plugin active="1" executionorder="1">
                            <title>Unset session id for guest users</title>
                            <phpcode><![CDATA[if($vbulletin->userinfo['userid'] <= 0)
    $vbulletin->session->vars['sessionurl']  = '';
    $vbulletin->session->vars['sessionurl_q']  = '';
                    <plugin active="1" executionorder="1">
                            <title>SET COOKIE FOR LOGGED IN USERS</title>
                            <phpcode><![CDATA[if ($send_cookies AND $cookieuser)
    // Cookie user
    vbsetcookie('imloggedin', 'yes', true, true, true);
    // Not permanent
    vbsetcookie('imloggedin', 'yes', false, true, true);
                    <plugin active="1" executionorder="1">
                            <title>Send X-LiteSpeed-Cache-Control header for logged in users</title>
                            <phpcode><![CDATA[// Do not cache logged in user pages
    if ( $vbulletin->userinfo['userid'] )
            header('X-LiteSpeed-Cache-Control: no-cache');
    Litespeed Cache Settings:


    .htaccess rules:


    And the result:

  4. NiteWave

    NiteWave Administrator

    the rewrite rule may need adjust to fit your forum.
    for example, cookie prefix may not be "bb_"
    you can PM me the URL of the forum, so I can get more info to be able to suggest more.

Share This Page