That's one way to gain some benefit.
Another way is simply to allocate more RAM to your MySQL processes and beef up its cache settings so that it automatically caches queries and manages what is most current etc.
That's one way to gain some benefit.
Another way is simply to allocate more RAM to your MySQL processes and beef up its cache settings so that it automatically caches queries and manages what is most current etc.
.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole
Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.
Hello,
I've just tried this and it's dropped my page parse times substantially. I would recommend it to anyone who is suffering from a lack of resources.
Parse Time: 2.752 - Number of Queries: 417 - Query Time: 0.1318254763031
vs.
Parse Time: 0.278 - Number of Queries: 271 - Query Time: 0.082182839813233
Parse Time: 0.858 - Number of Queries: 329 - Query Time: 0.11570456744385
vs.
Parse Time: 0.265 - Number of Queries: 262 - Query Time: 0.072043928604126
I'm going to be applying this caching scheme to other areas of my cart, perhaps the category menu?
Thanks!
I am desperately trying to use this as a solution to speed up my installation of ZenCart on Dreamhost, at the very least as a temporary workaround until I move the store to an approved and faster host.
I have finally gotten PEAR installed and the code above does not throw errors when trying to load the site; that is, until this morning it was not locating the Cache_Lite files to load up.
Now that the files can be found (had to modify the include_path), nothing seems to be any faster on the site. How can I know that the PEAR cache is being used and functioning properly? Is there any kind of test I can run or snippet of code that will produce some output to verify?
Any help is appreciated.
Thanks,
Armen
As an update, I believe I have solved my problem and the caching is working for me now.
A note to folks who are doing this on a shared hosting account and following the original poster's instructions:
1) Make sure you use fully qualified path names wherever you need to provide a path, including in the PHP source code sample above.
2) Make sure that you have write permissions on the directory you're asking the Cache_Lite to cache into. In the sample code above the poster used /tmp/ which I didn't notice until tonight; as a shared hosting user I do not have write access to that folder on the server. Just change that path into a fully qualified one to some folder you create in your user folder. Something like ~/pear_tmp/ *without* the tilde.