News:

Support the VirtueMart project and become a member

Main Menu

[ SOLVED ] Virtuemart Caching

Started by weeyas, October 01, 2012, 08:32:11 AM

Previous topic - Next topic

bytelord

Great then :)

Thanks for sharing

Regards
Production: Joomla 2.5.8 | VM 2.0.14 | PHP 5.3.13
Testing     : Joomla 2.5.8 | VM 2.0.16 | PHP 5.3.8
Testing     : Joomla 2.5.8 |    VM 2.1   | PHP 5.3.8

- Don't Forget to mark thread as solved when it is solved!
- Please do not PM with support questions, use the forum!

Peter Pillen

i can't believe this jotcache configuration can work on vm2. I've been at it for 2 days now (frustrated) and there is no possible configuration that works.

page=shop.cart,page=checkout.index,page=shop.product_details,pop=1 as excluded query strings looks incorrect to me, because they don't appear in my url (with SEF turned of). If I use these strings, the page navigation in category does not work properly. I get redirected to the first page over and over again.

view=productdetails,view=cart,view=user would seem correct to me, because that I find in my urls. But even then... it does not work for the page navigation (meaning previous-next)

I have 300 products in one category... if the cache is clean I can browse to all of them. But if I leave the category on the sixth page to purchase an item in a different category. I cannot view page six from that previous category. And after a few days the sites shuts down the navigation. limitstart=30 , 60 , 90 and so on... all turn back the first 30 products.

The position exclude does not work too. I've used the marks in my template with "none" as style, because xhtml breaks up the css of the cart button.

<!-- jot cart s style="none" --><jdoc:include type="modules" name="cart" style="none" /><!-- jot cart e -->

But even then the cart is loaded from the cache. In the position exclude menu I have "none" written behind the style, so that is correct as well. Using xhtml to test it, does not work either.

Hopeless situation. I really need a clear explanation of this.

1. does it work with sef urls?
2. what is the best exclude query string for virtuemart 2 on joomla 2.5?
3. How to exclude a module position correctly? is it only possible with xhtml?
4. I tested all this with the joomla cache in configuration "disabled". Does it only work with "on-conservative caching"?

Peter Pillen

In the meantime I discovered that

cart,user,orders,askquestion,invoice,pluginresponse,state

is the correct string you need to insert in the Jotcache "compenent exclusion" table to exclude certain VM2 views from caching. But the problem with the pagination remains. I found this topic (http://forum.virtuemart.net/index.php?topic=110578.0) that relates to the cache vs pagination problem, but even after this code update, it still doesn't work.

The cart position exclusion also remains a mystery. For now I'm running without any cache because that is the only way it works correctly.

Milbo

#18
Quote from: amlil71 on November 28, 2012, 23:28:23 PM
"As you got on VM forum JotCache is working with VM2. Also on my
test server is working with following settings.
URI exclude :
page=shop.cart,page=checkout.index,page=shop.product_details,pop=1

This is a strange answer, because the settings are for vm1!

Quote from: P2 Peter on January 12, 2013, 12:54:43 PM
page=shop.cart,page=checkout.index,page=shop.product_details,pop=1 as excluded query strings looks incorrect to me, because they don't appear in my url (with SEF turned of).

Exactly

Quote from: P2 Peter on January 12, 2013, 16:39:57 PM
In the meantime I discovered that

cart,user,orders,askquestion,invoice,pluginresponse,state

sounds better yes.

But I do not really have a solution. I prefer to learn how to optimise the apache cache stuff, so that works good with joomla and vm
Should I fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/

bunglehaze

Bytelord, with all respect. How can you say that there is no issue with VM2 caching when you cannot implicity switch off module caching using the  <do not cache>  setting in the module settings? That works for all other components, I ask a module to not be cached and it obeys - this does NOT work in VM2 modules - regardless of the justification.

I should not need another component to handle the caching of  modules but I don't actually mind as I have used jotcache in the past with great effect, the fact is though that many people need to use either the module cache for most modules but exclude certain others -the random products function in the product module is a perfect example, the products do not load randomly on each page load because they are cached.

Saying VM caching is not a problem is misinformation, if you said that VM2 caching does not work properly with Joomla's because of mechanics you may find people more understanding but saying it all works properly when infact it does not just makes users think you are dodging an issue. (just playing devils advocate)

regards

Milbo

bunglehaze, do you know how many types of caching exists in a joomla component?

We have the pure program cache
We have the joomla cache
We have the server cache
we have the browser cache

We just use the normal joomla cache and do not interfere there, except the category browse module. In this case we use the joomla caching for the category tree and it is hardcoded to 1, because it should be also activated, even if people do not use the normal joomla cache.
Give me a real issue with it. There is only one issue, but it is only for the person just changing the categories and wondering that they see still the old tree. Not a problem for a real store. but more advanced stores cannot use the joomla caching at the moment. The prices would not change for different shoppergroups and things like this. But the category tree must be cached, because it is quite time intensiv process.
Should I fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/

bunglehaze

Milbo, the only real issue as far as I can see with Joomla caching is that of the VM modules. If any of the joomla caches are enabled (I don't use browser caching ever here though) but mainly I choose to keep the page cache disabled but would like to be able to use the system cache and the VM modules have do not cache chosen they still cache results for things such as the products module when set to random products. The very function of random products is for showing a different results set on each page load so where the other options such as top ten or bestsellers can be really useful while cached (and recommended actually) the very opposite is true for the random products, you WANT them to display differently on every page load when the Joomla cache option is set to do not cache.

There is just one other area I notice the cache interfering and that is in the checkout, when enabled it does cause problems when for instance you try to remove an item and you have to come out of the checkout page and go back for it to work - perhaps there could be a bit of code in the checkout to specifically ignore all types of caching?

As I say I am just playing devils advocate, I just keep all joomla cache's switched off because on the one site I notice it being an issue for random products is where I need them to display randomly, and the issue of the checkout page has caused a few problems. It would be good to be able to use the system cache though at the very least.

EIF

Bunglehaze, what you say are exactly the problems I have with caching within virtuemart.
How did you solve this? Using JoTcache?

bunglehaze

EIF, to be honest I just gave up trying and resigned myself to not having any cache turned on in any format. It really is the opposite of the fast and snappy user experience I had hoped for but I could not find a way around it. Jotcache could probably work with a load of work but the cache system in Joomla is perfectly adequate for using if the 'do not cache' option in the joomla modules was obeyed by the virtuemart modules.

franzpeter

I do not use Joomla page cache and I exclude Joomla main menu or where ever VM frontpage is linked to in a Joomla menu. I use for all the other things the standard Joomla cache and I do not see any problem. It is also good to exclude slider modules from cache and modules, which display new, featured products. But that has nothing to do with VM itself.

e-trader

Quote from: Milbo on January 21, 2013, 16:53:26 PM
bunglehaze, do you know how many types of caching exists in a joomla component?

We have the pure program cache
We have the joomla cache
We have the server cache
we have the browser cache

We just use the normal joomla cache and do not interfere there, except the category browse module. In this case we use the joomla caching for the category tree and it is hardcoded to 1, because it should be also activated, even if people do not use the normal joomla cache.
Give me a real issue with it. There is only one issue, but it is only for the person just changing the categories and wondering that they see still the old tree. Not a problem for a real store. but more advanced stores cannot use the joomla caching at the moment. The prices would not change for different shoppergroups and things like this. But the category tree must be cached, because it is quite time intensiv process.

We are using "Language Domains" plugin to present each language of the multi-lingual website on to a separate domain. With conservative caching enabled, the product category module shows the English category tree and not that of the selected language. Only the title of the module is in the correct language. And switching off the caching of the module does not work. Now I know why!