This contribution enables the osCommerce developer or advanced webmaster the ability to cache just about anything. Whether you need to cache a large array, template, or even [executable] PHP code this class can handle it.
Originally designed and coded to be a scalable alternative to filesystem cache for my Ultimate SEO URLs contribution it can be used for just about any cache need. This class can be the base for a database driven template system or global data cache on a per language basis. It is extremely flexible, robust, and fast.
As a forward, if you have no idea whether your store would benefit from cached data then this contribution is NOT for you. It is geared toward contribution developers and coders.
This is the base class that I'll be using for my contributions from now on. Also, it will serve as the core of my template engine :-)
Legend: 
Download

Report
Sometimes i got query errors due to race-conditions; When two (or more) clients call save_cache, they second will fail since the key allready exists.
This problem was attempted to solve by first doing a query if the key exists or not, then decide to either insert or update. This is offcourse not threadsafe...
I tried to fix it with this update by using 'on duplicate key update' so both tasks (query + insert or update) are done by mysql in one go.
This package is an alternate method to cache everything.
I worked on the chemo's class but the data are recorded on files.
My site is very heavy and consume too much sql ressources.
4 or 5 seconds was too much.
Now it load on .5 seconds with this class.
Report to older contrib for install and use.
Mine is 100% compatible.
Include another class (currencies) which is called every page but data should never change so it can be cached for a long time.
Thank you chemo for you great works.
Fixed a small typo in example....
$ missing in example code
Fixed a few logic problems and also cleaned up the code.
A big thank you goes out to Chris Laroque...for double checking my code and forcing me to make this as server resource friendly as possible.
Bobby
This contribution enables the osCommerce developer or advanced webmaster the ability to cache just about anything. Whether you need to cache a large array, template, or even [executable] PHP code this class can handle it.
Originally designed and coded to be a scalable alternative to filesystem cache for my Ultimate SEO URLs contribution it can be used for just about any cache need. This class can be the base for a database driven template system or global data cache on a per language basis. It is extremely flexible, robust, and fast.
As a forward, if you have no idea whether your store would benefit from cached data then this contribution is NOT for you. It is geared toward contribution developers and coders.
This is the base class that I'll be using for my contributions from now on. Also, it will serve as the core of my template engine :-)