VirtueMart Forum

VirtueMart 2 + 3 + 4 => Security (https) / Performance / SEO, SEF, URLs => Topic started by: atrus on June 25, 2019, 15:00:55 PM

Title: Page Caching based on cookies
Post by: atrus on June 25, 2019, 15:00:55 PM
Hi all,

We are using Cloudflare for our VM3 website and we'd like to use its caching functionality instead of the page caching joomla plugins out there. In order to exclude logged-in users and users with items added in cart though, we need to use cookies (which you just exclude in Cloudflare's settings - see attached pic). AFAIK though, VM doesn't produce any cookies for the logged user or for the add/remove from cart actions. Is this something possible to do, at least as an option in the config?

Rgrds

Title: Re: Page Caching based on cookies
Post by: jjk on June 27, 2019, 09:31:32 AM
I don't have any experience with VM in Cloudflare. Just two hints:

1. VM uses the Joomla login. So I suppose the cookie for logged in users is the 'joomla_user_state' session cookie.
2. Using the Joomla 'System - Page Cache' plugin with VM is a bad idea anyway. See this forum thread: https://forum.virtuemart.net/index.php?topic=137111.msg479824#msg479824
Title: Re: Page Caching based on cookies
Post by: atrus on June 27, 2019, 10:58:51 AM
Thanks alot for your reply:

1. The joomla_user_state cookie is set as soon as u login by Joomla and the value is "logged_in". But it isn't present when not logged in, is destroyed when u log out. So it cannot be used unfortunately.
2. Yes, system-page cache is out of the question. So far we are using jotcache and it is a decent solution.

Cloudflare's caching solution is pretty straightforward (and fast). So, if anyone is interested to incorporate this cookie stuff for virtuemart, we can also discuss for a custom paid job, please contact me.

Rgrds,
Chris
Title: Re: Page Caching based on cookies
Post by: Studio 42 on June 27, 2019, 22:13:25 PM
@atrus,
If the solution for you is only to set this cookie(or another one) for all users, i think that it can be done in 1 or 2 hours.
Please contact me, if you need me to do the job.
Title: Re: Page Caching based on cookies
Post by: ssnobben on July 09, 2019, 08:05:19 AM
Check if your web hoster have Litespeed caching thats a good stable speed improvement for Joomla and use a Joomla litespeed plg & com. Joomla standard plg caching not working well still.. :'(

https://www.litespeedtech.com/products/cache-plugins/joomla-acceleration
https://openlitespeed.org/kb/litespeed-cache-for-joomla-on-openlitespeed/

Download latest version - download zip
com   https://github.com/litespeedtech/lscache-joomla
Plg  https://github.com/litespeedtech/lscache-joomla