Posted by admin on January 2, 2011 at 19:53
Yes, finally! I’m sorry it took so long. You can download it from:
Query Cache v1.7-beta
Installation instructions are in .zip file. Currently the package is released as beta. Please report any bugs either via email or below in comments.
Changes:
- Works with Zen Cart 1.3.9h
- Few memory tweaks
- Few bug fixes
Continue Reading
Posted by admin on February 22, 2010 at 15:24
I promised to release new, more memory efficient version of Query Cache soon – unfortunately (or fortunately) it seems that PHP is quite good at managing memory and there’s not much to improve. Therefore version 1.7 of Query Cache will be delayed.
Request to Query Cache users:
If You use Query Cache and Your store is still slow and it’s not related to search script please contact me either on email, PM on Zen-Cart.com (data_digger) or by leaving comment. I’ll check Your site and try to make necessary changes in Query Cache v1.7 for You.
Continue Reading
Posted by admin on January 30, 2009 at 23:38
New version of Query Cache is available. If You have lots of categories in Your store, this release is a must. Download new version here. Version 1.6 adds following features:
- Option to prefetch products_to_categories table for faster execution of zen_get_categories_products_list() function. You can turn ON/OFF this functionality by changing QC_ZEN_GET_CATEGORIES_PRODUCTS_LIST_PREFETCH switch in includes/extra_configures/query_cache.php. If Your store executes thousands of queries it’s pretty good chance that this option will solve it.
- Query Cache can now work in Admin area too. Just enable QC_ENABLE_IN_ADMIN in admin/includes//extra_configures/query_cache.php.
By default new switches are set to false. If You have many (at least few hundreds) products linked to many categories prefetching products_to_categories table will probably improve performance. On one store this switch managed to reduce query count from 15 000 queries ( yes, 15 thousands queries!) to about 100 queries (99,3% less queries!).
If You’ll find any bugs, please report back.
Continue Reading
Posted by admin on January 12, 2009 at 15:24
Version 1.5 of Query Cache for Zen Cart has been released. New version reduces query count by 80% (previous version reduced query count by ‘only’ 50%). Here’s list of changes:
- 970 queries down to 198 queries ( v1.0 executed about 450 queries )
- some performance improvements to code
- includes/functions/functions_categories.php has been rewritten to use cache and prefetch data. It reduces query count by about 100 queries (it depends on number of categories in Your store)
- basic queries for product from products table (for example “select products_name, manufacturers_id from products where products_id = ’7′“) can now be rewritten to “select * from products where products_id = ’7′“. It saves about 100 queries on default Zen Cart demo store.
Download Query Cache v1.5. See updated blog entry on Query Cache for updated charts, demo stores and screencast.
Stay in touch
Just type Your address here to be notified of new versions of Query Cache (You’ll receive only updates on Query Cache). Quick info: We hate spam, Your email will not be given to anyone.
Continue Reading
Posted by admin on December 13, 2008 at 23:43
Update: Query Cache V1.6 has been released – read here
Query Cache is free, in memory cache designed to work with Zen Cart. It can reduce number of queries sent to database by over 80% (see charts below). Thus, Query Cache might greatly reduce query execution time and response time of most Zen Cart stores.
You might want to jump quickly to see Demo Stores. Compare number of queries on each store.
Performance Analysis
We’ve ran some tests on demo installment of Zen Cart 1.3.8a which contains just a few products, few categories, one customer and no orders. Still, Zen Cart generated over nine hundred queries (>900!) just to load first page of the demo store (You can check how many queries generates Your store by turning on ‘Display Page Parse Time’, read more). After that, Query Cache has been installed and it managed to reduce number of queries by half (from 900 to 199 queries approx.).
Other pages where also checked, including: category view page, search results page and ‘static’ (more or less) shipping information page. Results are presented on figures below:
Advantages of Query Cache
- reduces number of queries sent to database by 80%
- it’s very easy to install (jump to Installation instructions)
- reduces page generation time, reduces load on database server.
- works with all 1.3.x versions of Zen Cart
Disadvantages of Query Cache
As far as We can tell there is only one disadvantage: at this moment Query Cache can’t detect if database has been changed while php script is running. This means that if, for example, information about product is pulled from database, then product is updated, and retrieved again from database (all happening in one request) updated information might not be retrieved (in next request information will be updated).
Download
Here is package including Query Cache for ALL versions of Zen Cart 1.3.x:
Download Query Cache – latest version
Installation Instructions
First, download contribution here. Extract it with WinZip or something similar. Go to extracted directory. There are few directories named like ‘Zen-Cart 1.3.x’ where ‘x’ is minor version number of Zen Cart. To install this module:
- BACKUP BACKUP BACKUP!
- Upload ‘includes’ directory (from directory corresponding to Your Zen Cart version) on Your server (via ftp, sftp or any other protocol).
- Done.
Note: Query Cache v1.5 has feature that might slow down Your store if Your web server is very slow. In such case You can try to set QC_USE_PRODUCT_QUERY_DETECTION in includes/extra_configures/query_cache.php to FALSE.
This contribution is preconfigured to use Query Log _IF_ it’s available. If Query Log is not installed, Query Cache will still work without any problems (or at least it should;)
How to verify that Query Cache Works
Before installing Query Cache check how many queries Your store executes:
- Enable ‘Display The Page Parse Time’ option in Store Admin in Configuration -> Logging.
- Go to Your store, scroll down and see how many queries where executed.
Now, install Query Cache and visit the same page. Check query count, it should be much lower.
Screencast
Here is screencast showing how to install this contribution.

Demo Stores
Here are two Demo Stores:
Demo Store with Query Cache installed
Demo Store without Query Cache installed
Take a look at footer of each store. As You can see Query Cache greatly reduced number of executed queries.
Is it free? (Yes)
Yes, it is. You can use it on unlimited number of sites without any costs. You can redistribute it, change the source code (but leave us as original authors) etc. You can’t sell it or make any profit of it.
Stay in touch
We plan to release new version of Query Cache soon, with some new features that will further reduce number of executed queries and improve performance of Your store. Just type Your address here to be notified of new versions of Query Cache (You’ll receive only updates on Query Cache). Quick info: We hate spam, Your email will not be given to anyone.
Continue Reading