Page Caching
Plugin Description:
Version 2.3 Update
o - All value now use strip_decode before outputting
o - Added alias function 'echoPageField' which is an alias for 'getPageField'
o - changed pubdate to pubDate
Version 2.2 Update
o - check to see if pages have been updated/deleted before writing page.array file.
Version 2.1 update.
o - Changed plugin to use header hook
o - fixed a bug in retrunPageField if field was content
o - added hook to allow other plugin to cache their data
The Pages.php Plugin caches all you page data into a single XML file called /data/pages/pages.array
This file is read into an array and is made available to your templates to quickly access page information without having to read in individual files each time.
The XML file is updated each time a page is edited and saved.
The plugin has been tested with a site with 2500+ pages each one with a menu entry. Page Generation on a site this size was faster by approx 70% as there was only 2 file reads, one for the pages and one for the content. For the above example the menu generation script used the plugin rather than reading in each file.
All data except the "Content" information is added to the file.
The following functions are available to you:
getPageContent($page) - Echos the content of the Page
getPageField($page,$field) - Echos the Field of the requested Page
returnPageContent($page) - Returns the content of the Page
returnPageField($page,$field) - Returns the Field of the requested Page
getChildren($page) - returns an array of slug names that are children of the given page
Note: $page is the Slug Name
Should work fine with all version since 2.x
Install Instructions:
Just copy into the plugins folder and your done.
Archived Versions:
These are old versions of this file. Please use with caution as they are probably out of date and no longer supported. ShowHide
Download


