[FX.php List] FXNeoCache

Roger Price rp272 at cam.ac.uk
Fri Aug 1 13:57:47 MDT 2008


David

I first learned about FXNeocache on this list and have implemented it on my site.

I have a menuing system that is database driven and which does not change all that often. This seemed to be an ideal candidate for caching!

It was easy to install and implement and I began to see real benefits but discovered that if I made a change and forced a refresh on say the home page then the change was not replicated on other pages I tried. Over time the performance seemed to drop off.
A quick read of the code showed the reason was that parameters from each find were concatenated with the page's URL to create the name of the cached data. A visit to the folder where the caches were stored showed hundreds of cached files (all containing the same data). 

I made a modification to the FXNeocahe code to permit a additional parameters to be passed to the function. One of these was 'unique' with the values of 1 for true and 0 for false. When 'unique = 0' the cache name was created without URL and thus was identical for every instance of my menu.

Having a short TTL defeats the purpose of using a cache if it is regularly expiring and needing to be recreated. However in the case of my menu which was set at 6 hours it was frustrating to make a change and then wait until the cache expired. It was possible to do this from within the page code but it had to be reset back afterwards. I added a feature that tested for two 'get' values that could be appended to a page URL  viz ?refresh=1&debug=1 the first forces the cache to expire (and recreated with new data) and the second turns on the debug info on.

I tried to share this with the authors of FXNeocache but they were not interested in the slightest.

If any of these feature are of interest to you please contact me off-list and I will send you a copy of the appropriate file.

FXNeocache has been working most satisfactorily for many months now and I almost take it for granted. It does as you have discovered seriously improve performance but only in the appropriate circumstances.

Roger





From: biscuit technologies 
Sent: Friday, August 01, 2008 7:37 PM
To: FX.php Discussion List 
Subject: [FX.php List] FXNeoCache


Hi, 
I've got an FX page that on load is pulling a pretty large data set of almost completely static data and so I've set up NeoCache to reduce the page load (went from 20 seconds to 3!).


I remember seeing a post not too long about NeoCache creating some problems over time - but I couldn't find it in the archive.


Does anyone have any tips to avoid problems or any warnings in general?


thanks,
David


--------------------------------------------------------------------------------


_______________________________________________
FX.php_List mailing list
FX.php_List at mail.iviking.org
http://www.iviking.org/mailman/listinfo/fx.php_list
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://localhost/pipermail/fx.php_list/attachments/20080801/4d082737/attachment.html


More information about the FX.php_List mailing list