Feature request : Make litespeed cache easier to use for end users

wanah

Well-Known Member
#1
Hello,

Litespeed cache is very nice and fast but is very difficult to put in the hands of end users for shared hosting.

We do not enable it by default as it would cause problems on lots of different websites.

Enabeling it on a website that has a seperate admin and frontend isn't that difficult however with most common scripts it's very difficult for end users to use.

We would like to have some sort of template system to user can enable litespeed cache on a per script basis.

For example cache for Wordpress requires no cache for :

1) Requests with POST
2) Requests with URI beginning with wp-
3) Requests to xmlrpc.php
4) Cookies containing one of the following :
comment_author_|wordpressuser_|wp-postpass_|wordpress_logged_in_

All others should be in public cache.

I'm not sure if it's possible for users to be able to purge their own cache through only editing .htaccess file…

That's for Wordpress…

For other scripts like prestashop, magento etc rules are different and types of cache are different.

What we would like is either a template system to add just a simple line to a htaccess file like for example :

enablecache="wordpress"

What would be very nice would be to have a cPanel plugin so users could just choose a folder and a script and click enable…

If we are to promote Litespeed's cache we need to make it easier…
 

NiteWave

Administrator
#2
agree. for wordpress
For example cache for Wordpress requires no cache for :

1) Requests with POST
2) Requests with URI beginning with wp-
3) Requests to xmlrpc.php
4) Cookies containing one of the following :
comment_author_|wordpressuser_|wp-postpass_|wordpress_logged_in_

All others should be in public cache.
the rewrite rules can be:
RewriteEngine On
RewriteCond %{REQUEST_METHOD} ^HEAD|GET$
RewriteCond %{REQUEST_URI} !^/(wp-|xmlrpc\.php)
RewriteCond %{HTTP_COOKIE} !(comment_author_|wordpressuser_|wp-postpass_|wordpress_logged_in_)
RewriteRule .* - [E=Cache-Control:max-age=600]

put above rules in httpd.conf's virtual host section (not in .htaccess so end users no need bother the rules)
(other settings are similar to http://blog.litespeedtech.com/2011/01/28/speed-up-vbulletin-sites-through-litespeed-built-in-cache/ )

for magento, we have LiteMage to release soon. you can search LiteMage in the forum for more info.
 

wanah

Well-Known Member
#3
We can't put them in httpd.conf directly as we have about 800 different websites per server without knowing what customers are going to host.

In order to encourage customers to use it we need something rearly simple for them to setup.

We also would need a simple way for customers to clear their cache.

We might start looking into creating a cPanel plugin to do this unless litespeed could provide a sort of ruleset that users could add to htacess files to basicaly say :

enable cache for wordpress
enable cache for prestahop
enable cache for wordpress-woocommerce
enale cache for opencart

etc.

something like detecting lines like :

ls-cache-enable "wordpress|woocommerce"

Would make it seem much easier for users.
 

NiteWave

Administrator
#4
We can't put them in httpd.conf directly as we have about 800 different websites per server without knowing what customers are going to host.
in example of WHM/cPanel, in httpd.conf, just adding one line
Include "/usr/local/apache/conf/userdata/std/2_2/username/userdomain/wordpress.conf
which wordpress.conf contains above rewrite rules.

this may be the quickest way to enable the cache for each wordpress user.
add new directive in lsws may involve many work and may not be practical.
 

wanah

Well-Known Member
#5
The single ligne feature request is to make it easier for customers to enable.

I do not see the point of having a single line in httpd.conf as the whole point of a single line is to make it easier for users.

This is just a feature request that you can obviously refuse if you do not find it interesting.

I'm sure quite a few usages could be found for having a list of includes that admins could configure and users could add themselves to .htacess files with a ligne line of code…
 

mistwang

LiteSpeed Staff
#6
This kind of feature is already on our road map.
Adding different caching rules for different web application is relative easy, the difficult part is to purge outdated cached objects timely and accurately. For wordpress, may have to install a cache purge plugin.
 

wanah

Well-Known Member
#7
Great to hear, thanks :)

Unless I'm mistaken, there's no way for an admin to allow all users to invalidate their own cache without doing it manually on a per user basis ?
 

wanah

Well-Known Member
#9
We use /dev/shm for cache, so caching to user directory is not handy.

It lots of little things like this that make litespeed's cache not very usable or end users on shared hosting.

It's one worry we have about your magento plugin, if it's not easy enough for users to clear cache, it will not work well on shared hosting.

Will your magento plugin allow users to empty cache without having to put cache the the users directory ?
 

mistwang

LiteSpeed Staff
#10
LiteMage allow user to purge cache from magento admin console under "Cache Management".
Rarely need that as LiteMage can purge stale page accurately.
 

wanah

Well-Known Member
#13
Nice ! :)

For the demo I'm afraid we can't update to LS 5.0 until it's concidered stable. If litespeed 5.0 stable is released before LiteMage then I will defenity want a free trial.

Will LiteMage be a paid plugin ? Or will we have to pay extra to enable it ?
 
Top