LiteMage / Mobile site not being cached separately on 5.0.5

#1
Hi. I'm on a shared hosting, and they have no plans to upgrade their LSWS version for now on shared accounts (they are aiming at summer). So I'm wondering how should I proceed.

I've installed the LiteMage extension and it works great, however, the recommendation for mobile themes served from the same URL:

RewriteRule .* - [E=Cache-Control:vary=ismobile]
Does not work since I'm on 5.0.5 (and can't change that). Is there a way to revert back to "cookie usage" or is there anything else I could set to have a different variation of the cache?

For now, I've disabled the cache on the mobile site by means of not caching on a GET parameter (in my case: "mobile"), and adding that parameter to the querystring on .htaccess:

RewriteCond %{HTTP_USER_AGENT} "iphone|android" [NC]
RewriteCond %{QUERY_STRING} !^(.*)mobile(.*)$
RewriteRule (.*) $1?mobile=1 [QSA]

This is far from optimal though, as the mobile version won't be cached at all.

Is there anything I could do at all using 5.0.5?

I've seen the dev mode uses a request parameter called "lscache_vary" (with content of "dev~1"), but I'm not sure if I could crash it. This is a production server so I must be careful with the changes I do (I don't have LiteMage on my lab server, so I can't just do tests).

Thanks
 

Pong

Administrator
Staff member
#2
Since it has been addressed in new release, I believe better to push hosting company to upgrade to latest release.

5.0.x branch is pretty stable version with bug fixes only. Upgrade is just one command for less than 1 minute.

For me, I did not see the reason why holding off the regular upgrade process.
 

Lauren

LiteSpeed Staff
Staff member
#3
5.0.11 is more stable and better than 5.0.5. There's no risk to upgrade. and just one command to upgrade.

For your case, you have added a query string to the url. So it will be treated as separate url and cache separately. Just it won't be warmed up by litemage crawler automatically. You could create a custom list with that query string. I believe just remove from litemage config do-not-cache GET parameter and leave your rewrite rule as it is, it should work. Let us know if it doesn't. You can use litemage 1.0.16. Just set the crawler run interval >= public TTL.
 
Top