[Resolved] LS Cache not working?

Status
Not open for further replies.
#1
Hello,

I have LS cache running on my server, and I have the plugin installed in Wordpress. We have the 2 cpu license. We are being served via http2 in SSL mode.

I have setup Litespeed with the following settings:
enable public cache: no
check public cache: yes
ignore request cache control: yes

When I check my headers there is no litespeed cache.

    1. Request URL:
      Code:
      https://www.hookerandcompany.com/
    2. Request Method:
      GET
    3. Status Code:

      200 OK
    4. Remote Address:
      208.86.154.190:443
  1. Response Headers
    1. accept-ranges:
      bytes
    2. content-encoding:
      gzip
    3. content-type:
      text/html; charset=UTF-8
    4. date:
      Mon, 14 Mar 2016 21:30:50 GMT
    5. link:
      Code:
      <https://www.hookerandcompany.com/wp-json/>; rel="https://api.w.org/"
    6. server:
      LiteSpeed
    7. status:
      200
    8. vary:
      Accept-Encoding
  2. Request Headers
    1. :authority:
      Code:
      www.hookerandcompany.com
    2. :method:
      GET
    3. :path:
      /
    4. :scheme:
      https
    5. accept:
      text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8
    6. accept-encoding:
      gzip, deflate, sdch
    7. accept-language:
      en-US,en;q=0.8
    8. cache-control:
      max-age=0

Not sure if it makes a difference, but we are running cloudlinux with cagefs,
 
Last edited by a moderator:
#5
Code:
root@host [1670 11:39:27 ~]# find /tmp/diskcache -type f

/tmp/diskcache/f/d/1/fd1a5e0665523d12

/tmp/diskcache/f/8/8/f88b3f1f3253ccd7

/tmp/diskcache/f/3/b/f3b54fe07d9042dc

/tmp/diskcache/2/f/2/2f2c8c883fc346ef

/tmp/diskcache/2/a/f/2af096cff5e80add

/tmp/diskcache/2/0/3/2039a889d3b49fcd

/tmp/diskcache/9/6/5/965955c3f91830b0

/tmp/diskcache/9/3/e/93edf90d619c5ce9

/tmp/diskcache/4/0/4/404ce56943c8aec9

/tmp/diskcache/1/c/6/1c6c20f827cf6bd1

/tmp/diskcache/6/b/a/6baafde64448c7e7

/tmp/diskcache/.cacheman.shm

/tmp/diskcache/b/8/9/b89f7672b898022d

/tmp/diskcache/c/8/5/c852e7d1425e5213

/tmp/diskcache/3/d/0/3d0a59f94aefd52e

/tmp/diskcache/.cacheman.lock

root@host [1671 11:39:39 ~]#
Wordpress plugin is latest version from the wordpress install screen (I installed it yesterday).
 
Last edited by a moderator:

NiteWave

Administrator
#6
looks like your website is quite dynamic and fast.
maybe lscache for wordpress plugin conflict with another plugin ?
do this site have many wordpress plugins ?
 
#7
Is it possible that the header just isnt attached for some reason? Since installing the plugin the site SEEMS a lot faster. I just cant verify it. Is the fact that their are files in the diskcache folder indicate at least one of our sites has the cache working? IS there a way to tell what cache files are from what website?

Wordpress plugins I am running:
Code:
Disable Comments
Disable Emoji
Featured Video Plus
Hide Categories
Litespeed Cache
Mailchimp for Wordpress
Really Simple SSL
Remove Query Strings from Static Resources
SSL Insecure content fixer
Starbox
Widget CSS Classes
Wordfence
Yoast SEO
For a list of installed software please see the txt file attached in the next post.
 
Last edited by a moderator:

NiteWave

Administrator
#9
your site's URL structure looks special --
Code:
https://www.hookerandcompany.com/
https://www.hookerandcompany.com/#section2
https://www.hookerandcompany.com/#team
...
at server side, they are same URL -- characters after # are removed.
maybe that's why cache not work.
can you tell if the URL structure is linked to a plugin ?
 
Last edited by a moderator:

Michael A

Administrator
Staff member
#12
Hello Pierre,

We've just updated our recommended Cache Policy settings for our LSCache WordPress and Xenforo plugins/add-ons.

Try the following settings:
Code:
Enable Public Cache - No
Check Public Cache - Yes
Cache Request with Query String - Yes
Cache Request with Cookie - Yes
Cache Response with Cookie - Yes
Ignore Response Cache-Control - Yes
Ignore Request Cache Control - Yes
Regards,
-Michael
 
Last edited:

bobykus

Well-Known Member
#13
With a such configuration all I get is
Code:
2016-03-21 10:45:32.636 [DEBUG] [ip:54900-3#APVH_sproba.ip1:lsapi] prepare page cache
2016-03-21 10:45:32.636 [DEBUG] [ip:54900-3#APVH_sproba.ip1:lsapi] neither public, nor private cache are enabled

even in WP home
Code:
[wordpressLiteSpeed]# cat .htaccess

AddType application/x-httpd-php7  php

DirectoryIndex index.php index.html

CacheLookup public on

we use apache style configs, LiteSpeed Cache Version 1.0.2
 
Last edited by a moderator:

Michael A

Administrator
Staff member
#14
Hi bobykus,

This message can be ignored, both public and private cache should be set to "No" when using the plugin.

Have you followed all the steps in our installation guide here?

https://www.litespeedtech.com/support/wiki/doku.php/litespeed_wiki:cache:lscwp:installation

As mentioned, "Enable Public Cache" should be set to "No" with "Check Public Cache" set to "Yes". In your case you can set "Check Public Cache" to "No" as well since it seems that you are enabling the check in your WordPress .htaccess file. The rule should be:

Code:
<IfModule LiteSpeed>
CacheLookup public on
</IfModule>
Similarly, you must make sure that you have set the server level cache root configuration. This can be done through the WebAdmin or in your Apache config file.

If none of these suggestions help, can you describe what problems you are currently having?

Regards,
-Michael
 
Last edited:

bobykus

Well-Known Member
#15
Yes, of course! And never get
Code:
<IfModule LiteSpeed>
CacheLookup public on
</IfModule>
when .htaccess contains only
Code:
CacheLookup public on
with


Code:
ip@ip:~$ curl -I http://sproba.ip1/wordpressLiteSpeed/
HTTP/1.1 200 OK
X-Powered-By: PHP/7.0.4
Content-Type: text/html; charset=UTF-8
Link: <http://sproba.ip1/wordpressLiteSpeed/?rest_route=/>; rel="https://api.w.org/"
Date: Tue, 22 Mar 2016 08:20:50 GMT
Accept-Ranges: bytes
Server: LiteSpeed
Connection: Keep-Alive

LiteSpeed Cache Settingsv1.0.2
Enable LiteSpeed Cache Enable


The rest is default. LiteSpeed 5.1.4.
 
Last edited by a moderator:
Status
Not open for further replies.
Top