News:

Support the VirtueMart project and become a member

Main Menu

Page Caching based on cookies

Started by atrus, June 25, 2019, 15:00:55 PM

Previous topic - Next topic

atrus

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


jjk

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
Non-English Shops: Are your language files up to date?
http://virtuemart.net/community/translations

atrus

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

Studio 42

@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.

ssnobben

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
Success in the long run Its not about the code its about the people and community that's make it!
Its not what you say its what you do that matters!

Darb - aka ssnobben