VirtueMart Forum

VirtueMart 2 + 3 => General Questions => Topic started by: weeyas on October 01, 2012, 08:32:11 am

Title: [ SOLVED ] Virtuemart Caching
Post by: weeyas on October 01, 2012, 08:32:11 am
Dear Developers of Virtuemart,

i'm wondering if i could exclude Virtuemart from caching, because if caching is enabled, my virtuemart goes crazy. (Search caches, so the first product searched shows until cache expires, shopping cart does strange things)

So is it possible to Enable global caching, and make Virtuemart not to cache at all?

Thanks,

Greetings,
Weeyas
Title: Re: Virtuemart Caching
Post by: bytelord on October 01, 2012, 09:08:15 am
Hello,

Take a look here: http://forum.virtuemart.net/index.php?topic=106678.msg356107
Title: Re: Virtuemart Caching
Post by: weeyas on October 01, 2012, 15:54:01 pm
Well, i already tried JoTCache, but nothing happened when i tried to exclude com_virtuemart from caching.
Title: Re: Virtuemart Caching
Post by: bytelord on October 01, 2012, 16:16:07 pm
works for me. Have you done it correctly? did you read that i have post on the previous thread i post you? : http://jotcomponents.net/web-programming/jotcache/jotcache-help/126-jotcache-ver-3-0-help?showall=&start=3
Title: Re: Virtuemart Caching
Post by: weeyas on October 03, 2012, 15:09:40 pm
yes, i tried to check the Virtuemart checkbox, nothing happend. And i also want to exclude the virtuemart search module from caching, and thats not a component, can't write it to view field.
Title: Re: Virtuemart Caching
Post by: bytelord on October 03, 2012, 17:50:26 pm
Hi,

But is in it's options how to exclude them. Please read the program instructions first and if you have any issues with thirdparty software you could always ask them.
You are able to exclude components, modules but as long as the user is non logged.

Regards
Title: Re: Virtuemart Caching
Post by: amlil71 on November 26, 2012, 11:26:16 am
Hello all, is someone find a solution to solve Virtuemart 2 cache problems ?
Title: Re: Virtuemart Caching
Post by: bytelord on November 26, 2012, 12:35:30 pm
Hello,

Virtuemart 2 does not have cache issues and also uses it's own cache technics to improve site performance and data utilization, this is related on the fact you want to exclude the vm2 pages from caching so your vm2 updated dynamically on user options and changes. As you read on the above posts you could use JotCache, did you give a try?
Keep in mind when a user login on the system the cache Technics are disabled.

Regards
Title: Re: Virtuemart Caching
Post by: amlil71 on November 26, 2012, 17:23:36 pm
Hello,

thank you for your answer and sorry for my bad english. I installed Jotcach but i have issues with virtuemart component. I have to exclude com_virtumart and  from jotcach  but i want to improve virtuemart cach. I have a problem with VirtueMart Shopping Cart module which doesn't  have cach options. So i can't exclude it from cach. Thank you.

Regards
Title: Re: Virtuemart Caching
Post by: bytelord on November 26, 2012, 17:34:48 pm
Hello,

You have to exclude the cart module also. Please look o jotcache web site and you will find information how to exclude modules from caching.
Exclude pages and modules from caching: http://www.jotcomponents.net/web-programming/jotcache/jotcache-help/126-jotcache-ver-3-0-help?showall=&start=3
Title: Re: Virtuemart Caching
Post by: amlil71 on November 26, 2012, 18:26:56 pm
Thank you, i tried  to exclude it but the exclusion did'nt work for me. Maybe because i don't write the good text. What  do you write in jotcach option  ( http://www.kanich.net/radio/site/images/stories/jotcache/jotcache-exclude-url.png) in order to exclude VirtueMart Shopping Cart module please?  If i have the right syntax i will solve my problem. Thank's a lot, i try to find a solution since one month. Regards.

Title: Re: Virtuemart Caching
Post by: bytelord on November 26, 2012, 18:48:52 pm
You could exclude the whole component be adding com_virtuemart. To exclude a module you have to add the following code:
<td>
   <!-- jot user2 s style="xhtml" --><jdoc:include type="modules" name=user2" style="xhtml" /><!-- jot user2 e -->
</td>

Please read the instructions more carefully and you could always ask on jotcache forum for any questions you have with the component.

Regards
Title: Re: Virtuemart Caching
Post by: amlil71 on November 26, 2012, 19:12:07 pm
Thank you, it seems to be complicate with virtuemart 2. I will ask jotcache forum if they have a solution. Thank you :)
Title: Re: Virtuemart Caching
Post by: bytelord on November 26, 2012, 21:35:57 pm
Is a little bit complicate yes, if you find a solution you could post here to help other users also.
Title: Re: Virtuemart Caching
Post by: amlil71 on November 28, 2012, 23:28:23 pm
Hello,


i have a an anwser from jotcach component creator :

"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

Additionaly on template is necessary to exclude CART with jot tags."

Finally, i put "cart" in com_virtuemart and exclude "user6" position ( cart module position of my template)   and it's solve my problems.

Than'ks. Regards.
Title: Re: Virtuemart Caching
Post by: bytelord on November 28, 2012, 23:29:04 pm
Great then :)

Thanks for sharing

Regards
Title: Re: Virtuemart Caching
Post by: Peter Pillen on January 12, 2013, 12:54:43 pm
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"?
Title: Re: Virtuemart Caching
Post by: Peter Pillen on January 12, 2013, 16:39:57 pm
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 (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.
Title: Re: Virtuemart Caching
Post by: Milbo on January 12, 2013, 20:38:59 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!

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

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
Title: Re: Virtuemart Caching
Post by: bunglehaze on January 20, 2013, 17:01:50 pm
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
Title: Re: Virtuemart Caching
Post by: 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.
Title: Re: Virtuemart Caching
Post by: bunglehaze on January 25, 2013, 13:45:11 pm
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.
Title: Re: Virtuemart Caching
Post by: EIF on April 19, 2013, 18:41:55 pm
Bunglehaze, what you say are exactly the problems I have with caching within virtuemart.
How did you solve this? Using JoTcache?
Title: Re: Virtuemart Caching
Post by: bunglehaze on April 19, 2013, 23:49:47 pm
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.
Title: Re: Virtuemart Caching
Post by: franzpeter on April 20, 2013, 12:20:52 pm
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.
Title: Re: [ SOLVED ] Virtuemart Caching
Post by: e-trader on November 02, 2013, 21:16:58 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!