VirtueMart Forum

VirtueMart 2 + 3 + 4 => Virtuemart Development and bug reports => Topic started by: MAD King on May 24, 2015, 00:07:54 AM

Title: Cache is turned off, but VM gets still cached
Post by: MAD King on May 24, 2015, 00:07:54 AM
I just noticed that Joomla 3.4.1 is still caching some of VM 3.0.9 with the configuration Cache off.
Always cached is com_onepage and com_virtuemart_cats
Title: Re: Cache is turned off, but VM gets still cached
Post by: d0ublezer0 on May 27, 2015, 08:29:25 AM
Confirmed. Same problem with mod_virtuemart_product , for example, on product detail page.
I have Joomla cache is on, but module caching is off:
(http://f6.s.qip.ru/LHJwjz9D.png)

But, module still caching. As a result on all pages i see same "featured" products. When i do cache clean, module displayed new products. But, there are not changed before i go to clean cache again
Example page: http://www.zebra-tara.ru/catalogue/plastic-boxes/pb-300/400300270-02-524-detail

there is not changed when you serfing this site:
(http://f5.s.qip.ru/LHJwjz9F.png)
Title: Re: Cache is turned off, but VM gets still cached
Post by: borro on June 30, 2015, 10:13:15 AM
I also confirm it. Dear developers please pay attention to it. Did somebody find any solutions to fix that?
Title: Re: Cache is turned off, but VM gets still cached
Post by: franzpeter on June 30, 2015, 16:33:58 PM
I can confirm that. Even if switching the cache off inside the VM category module it always creates cache entries.
Title: Re: Cache is turned off, but VM gets still cached
Post by: Studio 42 on June 30, 2015, 16:46:02 PM
Hi,
This is the fix for correct caching:
file : JOOMLAROOT\modules\mod_virtuemart_product\mod_virtuemart_product.php
after the line 55 :
$key = 'products'.$category_id.'.'.$max_items.'.'.$filter_category.'.'.$display_style.'.'.$products_per_row.'.'.$show_price.'.'.$show_addtocart.'.'.$Product_group.'.'.$virtuemart_currency_id;

add:
if($filter_category) $key .= 'c'.vRequest::getInt('virtuemart_category_id', 0);

The current bug comes because cache key does not includes current category.

This bug should only when you use category filter.

Greets,
Patrick

P.S: THis is fix for product module.
For the categories, i have give a fix to the team, but because they don''t understand the fix, they have never added my fix(or another fix) for this problem.
Title: Re: Cache is turned off, but VM gets still cached
Post by: MAD King on June 30, 2015, 16:50:07 PM
Cannot confirm this. I do not use category filter.
Title: Re: Cache is turned off, but VM gets still cached
Post by: franzpeter on June 30, 2015, 16:58:16 PM
There is something inside the Joomla cache configuration called JLIB_FORM_VALUE_CACHE_vmfile what seems to be active even if not activated.
Title: Re: Cache is turned off, but VM gets still cached
Post by: franzpeter on June 30, 2015, 17:00:22 PM
@studio 42: which file do you mean to add the code?
Title: Re: Cache is turned off, but VM gets still cached
Post by: Studio 42 on June 30, 2015, 17:02:23 PM
Quote from: MAD King on June 30, 2015, 16:50:07 PM
Cannot confirm this. I do not use category filter.
this is not the same cache.
My fix is for 'mod_product' cache, for your problem, i have reported the bug seens 1 month, but noone in the current team, tried to apply(or fix with another solution) this bug for com_virtuemart_cats
Title: Re: Cache is turned off, but VM gets still cached
Post by: Studio 42 on June 30, 2015, 17:03:32 PM
Sorry file is :
YOURJOOMLA\modules\mod_virtuemart_product\mod_virtuemart_product.php
Title: Re: Cache is turned off, but VM gets still cached
Post by: Studio 42 on June 30, 2015, 17:09:29 PM
For the other problem see:
https://forum.virtuemart.net/index.php?topic=129548.msg445874#msg445874
Title: Re: Cache is turned off, but VM gets still cached
Post by: Milbo on July 02, 2015, 11:33:39 AM
Quote from: franzpeter on June 30, 2015, 16:58:16 PM
There is something inside the Joomla cache configuration called JLIB_FORM_VALUE_CACHE_vmfile what seems to be active even if not activated.

It is just a copy of the cache "file", with 2-3 fixes in it.
Title: Re: Cache is turned off, but VM gets still cached
Post by: Milbo on July 02, 2015, 15:30:30 PM
Quote from: Studio 42 on June 30, 2015, 16:46:02 PM
P.S: THis is fix for product module.
For the categories, i have give a fix to the team, but because they don''t understand the fix, they have never added my fix(or another fix) for this problem.

I dont remind that I got a fix, or the hint that the category id is missing
Title: Re: Cache is turned off, but VM gets still cached
Post by: Studio 42 on July 02, 2015, 15:53:13 PM
Hi,
i speak for com_virtuemart_cats, follow the link : https://forum.virtuemart.net/index.php?topic=129548.msg445874#msg445874
Quote from: Milbo on July 02, 2015, 15:30:30 PM
Quote from: Studio 42 on June 30, 2015, 16:46:02 PM
P.S: THis is fix for product module.
For the categories, i have give a fix to the team, but because they don''t understand the fix, they have never added my fix(or another fix) for this problem.

I dont remind that I got a fix, or the hint that the category id is missing


The problem is we're talking about two different bugs
Title: Re: Cache is turned off, but VM gets still cached
Post by: Milbo on July 02, 2015, 16:07:32 PM
yes and your construction was not working. I took the hint to delete not just virtuemart_cats but also mod_virtuemart_category