Jump to content

  • You cannot start a new topic
  • You cannot reply to this topic

cs-cart 3.0.6 cache system Rate Topic   - - - - -

 
  • cncinc
  • Senior Member
  • Members
  • Join Date: 23-Aug 12
  • 165 posts

Posted 22 February 2013 - 02:54 AM #1

hello eveyone. i use multi vendor 3.0.6 now

do you guys know about cs-cart cache system?

as we tested it it moves a--->b page then makes cache and works between 2page.

and if move other page and makes new one.

----so cs-cart makes cache when you access first time page.

do you know which file control all cache?

and where is located? and cache all save in VAR folder?

please let me know detail for cache system please~~~~~~~~~~~~

 
  • tbirnseth
  • CS Cart Expert
  • Authorized Reseller
  • Join Date: 08-Nov 08
  • 11363 posts

Posted 22 February 2013 - 07:10 AM #2

There are basically 2 caches in cs-cart. There is the Registry which is intended to cache database queries for all settings, language variables and other high-use DB operations.

Then there is the template cache. When you access a page, all the templates that make up that page are cached as the consolidated page.

The registry is almost fully built at first page after clearing the cache . Some language entries may be built on demand when accessed.

The template cache is built as pages are accessed. So iif you have an about-us page that is rarely accessed, then that set of templates that comprise the page will not be cached until the page is first accessed. Note that Google and other crawlers will generally fully build your template and Registry cache as they crawl your site.

The actual cache data can be stored in one of two methods (I discount use of mySQL because is a waste to use a db to cache the same db data). The standard method is file based. This has been constantly improved to distribute cached files within sub-directories for languages and other key functional areas (like admin versus customer settings, etc.). However, it still places a large load on the server's underlying system file cache. Note that mySQL is essentially file based too so it too makes heavy use of the underlying file subsystem of the server.

The other method is SQLite which seems to vary in reliability by hosting provider. Generally it uses a light-weight database to utilize a single table for caching all the registry data. It is faster than the file type but some sites have difficulty with contention issues.

The templates are always cached in the filesystem unless you are running your store in Development mode. Then no caching of templates occurs.

Hope this helps your understanding.

EZ Merchant Solutions: Custom (USA based) B2B Development, Consulting, Development and Special Projects (get a quote here).
Commercial addons, payment methods and modifications to meet your business and operations needs.


 
  • Hungryweb
  • Senior Member
  • Authorized Reseller
  • Join Date: 10-Feb 12
  • 1249 posts

Posted 22 February 2013 - 09:05 AM #3

if you wish to use it into addons, you can try:

...
/*
#cache level types

CACHE_LEVEL_DISPATCH
CACHE_LEVEL_STATIC
CACHE_LEVEL_USER
CACHE_LEVEL_HTML_BLOCKS
CACHE_LEVEL_LOCALE_AUTH
CACHE_LEVEL_TIME
CACHE_LEVEL_DAY
CACHE_LEVEL_LOCALE_AUTH
*/

$html = '';
$cache_name = '[UNIQUE_NAME]';
$controllers = array(); //ex array('index','categories')
Registry::register_cache($cache_name, $controllers, [CACHE_LEVEL_TYPE]);
if (Registry::is_exist($cache_name) == false) {
$html = '[CONTENT]';
Registry::set($cache_name, $html);
}
$html = Registry::get($cache_name);
...


I hope that helps,

---
Valentin

 
  • cncinc
  • Senior Member
  • Members
  • Join Date: 23-Aug 12
  • 165 posts

Posted 22 February 2013 - 01:13 PM #4

you guys awesome . you save my life . thanks so so much.

i just try to make faster page of subcategory.

i describe my server.

CPU ---XON 3.4GHZ 4CORE.
RAM --8GB
HDD--128SSD

cs-cart 30.6 multi vendor

-------product 70,000
-------language 13 now
------category 3500

i solve problem of performance with SSD HARD.


===========issue

i found that when i access page at first time , little slow but second is fast

looks like a--->b--->a--->b-->a moves page like this apply cache always.

but if i change a--b-->c c page is making cache so slow.


also my frontpage page is little fast now. but sub categories has problem to load.

first time load 2.8 second reloading 0.9 second

that;s why i asked cache system.

i really headace for this issue.

----------------do you know guys which is best way even first access makes fast way?

thanks thanks alot for your answer