[FX.php List] FXneocache

Roger Price rp272 at cam.ac.uk
Wed May 23 04:20:13 MDT 2007


I am please to report that FXneocache work brilliantly (once I sorted out the 'write' permissions on my webhost).

I have developed a site which has a dabase driven menu system which is obviously called by every page. In addition FMSA is located on another subnet as part of a larger MAN (Metropolitan Area Network in case you were wondering). The cache has reduced the finds fom approx 2 sec to approx  0.03 secs some of the other finds are even quicker.

The default TTL is 5 minutes whic is rather short for the 'menu' which changes rather infrequently. However if you have made a change you dont want to wait ages before you see the result!

I have made some small additions to FXneocache which allows the user to force a deletion and rewrite of the cache and or display the debug info without having to change anything. It utilises a couple of 'GET' parameter.

If anyone is interested I will send details. I realise that I need to document exactly what I have done (for future users) but really don't want to do this  just now.

I also asked another question that came up as a result of trying to get FXneocache to work but was not answered.

Here it is again:

  I have built a site using FX.php and to simplify maintenance made significant use of 'includes' for re-usable chunks of code. These have been saved with a 'php' extension only because my editor displays a formatted version of the code when I do so.

  The pages work exactly as I expect!

  I have recently tried to install 'FXneocache' after reading several postings in this list. I have not yet succeeded as I seem to have a permissions problem actually writing the cache files. I searched the Apache error_log and am working to resolve this issue (I will report on my success (or failure) as appropriate).

  However I also noticed lots of undefined variable errors.

  So this at last brings me to the point of this posting...

  How does Apache/PHP evaluate includes of PHP code snippets?

  An HTML page has an include 'get_menu_records.php' which incorporates an FX.php find followed by a 'for each' loop which identifies the current page and defines some variables. 

  Further down the page another include: :'display_menu.php' does another 'for each' loop and tests each itteration against one of the variables defined in the previous include. This is the variable that seems to cause the error although when parsed as a complete page everything is OK and works!

  Is the problem cause by my '.php' extension which forces an evaluation when it is included? I use '.html' for all the web pages which hides the fact that I'm using 'PHP.  However '.php' is defined in my root '.htaccess' to parse '.php' as well. Should I turn this off?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.iviking.org/pipermail/fx.php_list/attachments/20070523/23973e50/attachment.html


More information about the FX.php_List mailing list