Jump to content

IPS 4.3+ and Litespeed


Recommended Posts

Hi,

My hosting company is installing Litespeed with LScache. My question is how do I set up my end site wise. I see an outdated document on Litespeed's website: https://www.litespeedtech.com/support/wiki/doku.php/litespeed_wiki:cache:no-plugin-ip-board

Here's what was required for IPB 3x. Could someone help direct me to the right file in IPS 4.3x and instruct on the changes necessary?

 

Modify IP Board code

File admin/sources/classes/output/formats/html/htmlOutput.php needs to be modified to send out a ‘cache-control: private’ response header to logged-in users. Essentially, the response header is a flag that notifies LSWS what kind of cache to serve, which is the only information LSWS needs to know in order to work with IP Board.

Below changes are for IPB v3.1.4 as an example:

# diff -Naur a/htmlOutput.php b/htmlOutput.php
—-- a/htmlOutput.php    2011-03-16 15:39:09.000000000 -0400
+++ b/htmlOutput.php    2011-06-27 00:39:38.000000000 -0400
@@ -73,6 +73,17 @@
        public function printHeader()
        {
                //—————————————–
+               // Add "cache-control: private" header
+               //      for logged in users
+               // this is for LiteSpeed cache requirement
+               //—————————————–
+               if ( $this->memberData['member_id'] )
+               {
+                       header( "cache-control: private" );
+               }
+
+
+               //—————————————–
                // Start GZIP compression
         //—————————————–
       
@@ -1062,4 +1073,4 @@
 
                return $texts[ array_rand($texts) ];
        }
#

 

 

Link to comment
Share on other sites

Seems my host figured it out:

adding this code to admin/convertutf8/system/Output/Browser.php, since the file in the guide does not exist in this version of the software:

/*******************************************************
****************** Code for Litespeed caching *********/
if ( $this->memberData['member_id'] )
{
header("cache-control: private");
}
/******************** End Litespeed code ***************
*******************************************************/

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...