Anyone using the PDO caching, did you still you smartoptizer ontop of this lean caching method?
Replace the class.registry.php file:
1.Check that php configurations are built with PDO and sqlite support.
1.Log in to your administration panel, open the Administration tab, click on the Database link and click on the php information link in the top left corner of the page. The following page will open: http://www.your_domain.com/your_cscart_directory/admin.php?dispatch=tools.phpinfo, where “your_domain.com” is the name of your domain, “your_cscart_directory” is the name of the directory where CS-Cart is installed on your server.
2.Find the box called PDO. It should look like this:
PDO support enabled
PDO drivers dblib, mysql, odbc, pgsql, sqlite3.If PDO and sqlite support is disabled, contact your server administrator.
2.Download this zip archive sqlite_caching.zip and unpack it. This archive contains only the class.registry.php file.
3.Put the class.registry.php file to the core directory of the root CS-Cart installation by replacing the original file.
4.Clear the cache. In order to do it open this link in your browser: http://www.your_domain.com/admin.php?cc
where www.your_domain.com is the address of your store and where admin.php is a script file for the administration panel of your store that was renamed for security reasons.
[url]CS-Cart Documentation — CS-Cart 4.15.x documentation
I’ve been using the PDO caching for a while but not using smart optimizer. Since there is no real locking on this (or the prior registry stuff) any active server can have varying results (cs-cart Registry).
I have been experimenting with a “file cache” that caches results of all the stats (is_dir(), file_exists()) and file contents. I’ve had pretty good results with hit rates in the 90’s after the first access. However, when I use the Registry methods to register the class variable and to save the data across page loads it has varying results with the PDO registry but works correctly for the non-PDO version.
I have NOT probed deeper to find the problem. I simply used my own “session save” to store the info for my cache. I don’t really think I should have to do this level of diagnostics!!!
Also note that for every page request in cs-cart there are between 3 and 6 initializations of all the addons, php functions, classes and early controllers due to their inappropriate use of AJAX on page loads and/or for doing asynchronous statistics gathering which can be done faster and more effeciently if done synchronously when the new page is loaded… AjAX requests should be as a result of a user action, not simply a way to push the load onto the server. Sigh…
[quote name=‘tbirnseth’]I’ve been using the PDO caching for a while but not using smart optimizer. Since there is no real locking on this (or the prior registry stuff) any active server can have varying results (cs-cart Registry).
I have been experimenting with a “file cache” that caches results of all the stats (is_dir(), file_exists()) and file contents. I’ve had pretty good results with hit rates in the 90’s after the first access. However, when I use the Registry methods to register the class variable and to save the data across page loads it has varying results with the PDO registry but works correctly for the non-PDO version.
I have NOT probed deeper to find the problem. I simply used my own “session save” to store the info for my cache. I don’t really think I should have to do this level of diagnostics!!!
Also note that for every page request in cs-cart there are between 3 and 6 initializations of all the addons, php functions, classes and early controllers due to their inappropriate use of AJAX on page loads and/or for doing asynchronous statistics gathering which can be done faster and more effeciently if done synchronously when the new page is loaded… AjAX requests should be as a result of a user action, not simply a way to push the load onto the server. Sigh…[/QUOTE]
Hi
You mean you are not using smartoptizer since PDO elimates locking or cs-cart in general does not have a locking issue?
Thanjs
I don’t use smartoptimizer. My site is not big enough to get any significant advantage and I don’t like to inject other variables into my customer sites.
PDO does not eliminate any locking issues. As far as I know, PDO does not support any transaction processing, only simple SQL. However, it does reduce the risk of locking issues and because it is indexed (rather than just a read_dir() of the files in a directory) it is faster.
However there are some basic issues related to things like product filters that cause a new entry for every filter for every user. These never go away because there is no “aging” implemented within the cache. So it just keeps getting bigger and bigger whether you are using PDO or not. But with PDO, the access to items is faster, but there are sill a huge amount of unused items in the cache that will effectively never be read again.
Thanks for reply…
I have been using the html version of cscart for a while and recently changed it back to dynamic cart however I now notice a contant high mysql usage at about 40%
I checked that mysql processes and there are no processes causing this cpu usage so checked the server cpu usage log and at the top mysql is using the most cpu for the following command:
/usr/sbin/mysqld --basedir=/ --datadir=/var/lib/mysql --user=mysql --pid-file=/var/lib/mysql/MYSERVER.pid --skip-external-locking
Is PDO caching the answer to reduce this mysql load?
Thanks
First off you’re looking at the mysqld process which handles ALL mysql requests on that server. It never goes away so it always grows. That it is one of the most used processes on your server is normal.
PDO is yet a separate database and does not have a server. Think of it as Microsoft Access embedded into the process you are running (PHP in this case).
Don’t know what you mean about “html” and “dynamic” versions. Are you talking about AJAX and non-AJAX?
[quote name=‘tbirnseth’]First off you’re looking at the mysqld process which handles ALL mysql requests on that server. It never goes away so it always grows. That it is one of the most used processes on your server is normal.
PDO is yet a separate database and does not have a server. Think of it as Microsoft Access embedded into the process you are running (PHP in this case).
Don’t know what you mean about “html” and “dynamic” versions. Are you talking about AJAX and non-AJAX?[/QUOTE]
Oh when I say html I mean static cart… I was using static cart since when it was in dynamic mode it would kill my server since some queries where really badly written… having upgraded cs-cart seem to have fixed the bad intensive quires so I turned it back into a dynamic cart
"Use HTML catalog:
The aim of HTML catalog is to increase the page loading performance and make the site more friendly for search engine. You can generate a static version of your product catalog, that will be accessible at http://www.your_domain.com/your_cscart_directory/catalog/index.html (where “your_domain.com” is the name of your domain, “your_cscart_directory” is the name of the directory where CS-Cart is installed on your server as seen from the Web, e.g shop (if applicable)). When a visitor types http://www.your_domain.com/your_cscart_directory/ in his browser and clicks on categories, product links, he sees the HTML catalog pages (notice URLs of the pages). When he clicks on “Add to cart”, logs in, etc, he will be redirected to the so-called dynamic pages (that are generated by PHP - notice URLs of such pages).
"
Okay, static versus dynamic “catalog”…