View Single Post
  #48  
Old 06-10-2013, 11:41 PM
  Ksenia's Avatar 
Ksenia Ksenia is offline
 

X-Cart team
  
Join Date: Apr 2013
Posts: 735
 

Default Re: X-Cart 4.6 released

Quote:
Originally Posted by Rato
Installed 4.6.0 from scratch using Books & Magazine skin. Added product to lower category. When viewing from the store side each time a product is added, the newly added product shows up in New Arrival on both parent category and the subject category. However, it does not necessary show up in the subject category each time.

After adding more products to the subject category, sometime the new product will show up but as more product is added, sometime the newly added product again does not show up.

Sometime this can be resolve by clicking one of the sort by parameter but not necessary every time.

Tony, thank you for your question. Yes, you faced an issue which is a price for win in speed. Let me explain further.

This issue appears only when products are being switched from NOT available to available ( enabled, returned to stock etc), and never vice versa (if the product gets out of stock/disabled/removed, it disappears right away).

This is what we call 'product publishing time'. By default this time does not exceed 1 hour - till cache expires.

Possible solutions:

1) the easiest is to wait - no more than 1 hour (unless you modified cache ttl in config)

2) Clear cache by executing cleanup.php. Note that to execute this script you need auth code now, so the URL should look like this:

yourdomain.com/cleanup.php?auth_code=AUTH_CODE_GOES_HERE

Important: this script will clear all the caches (modules functions, Smarty) and your store will temporary slow down as the caches will need to be rebuilt.

3) You may play with cache TTL value in include/data_cache.php

Code:
'getRangeProductIds' => array( 'func' => 'getRangeProductIds', 'class' => 'XCRangeProductIds', 'ttl' => 3600, // 60 minutes to invalidate cache bt:#0132187 'use_func_cache_logic' => TRUE, 'dir' => 'search_cache', 'hashedDirectoryLevel' => 1,


But if you set it to too small value, and your store will need to rebuild cache too often, you will hardly enjoy the win in speed.

4) the most accurate solution ( if you want to speed up the product appearing but not affect the speed in general) is to clear not all the caches, but search cache only:

Code:
rm -r var/cache/search_cache/


Also, X-Cart architects will keep working on making X-Cart caching 'smarter'.
__________________
X-Cart team
Reply With Quote