Author Topic: Page Caching based on cookies  (Read 449 times)

atrus

  • Jr. Member
  • **
  • Posts: 127
Page Caching based on cookies
« 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


jjk

  • Global Moderator
  • Sr. Member
  • *
  • Posts: 3505
  • using Matomo instead of Google Analytics
Re: Page Caching based on cookies
« Reply #1 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
Non-English Shops: Are your language files up to date?
http://virtuemart.net/community/translations

atrus

  • Jr. Member
  • **
  • Posts: 127
Re: Page Caching based on cookies
« Reply #2 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

Studio 42

  • Contributing Developer
  • Sr. Member
  • *
  • Posts: 3973
  • Joomla & Virtuemart developper
    • Studio 42 - Virtuemart & Joomla extentions
  • VirtueMart Version: 2.6 & 3
Re: Page Caching based on cookies
« Reply #3 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.

ssnobben

  • Beginner
  • *
  • Posts: 26
Re: Page Caching based on cookies
« Reply #4 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
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