Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Page Caching Plugin
#1
Another Page Caching plugin !! Well sort of.

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:
Code:
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

If your using in your templates, the variable $id can be used for the current page.

Should work fine with all version since 2.x

Install Instructions:

Just copy into the plugins folder and your done.

Download on http://get-simple.info/extend/plugin/pagesphp/65/
My Github Repos: Github
Website: DigiMute
Reply


Messages In This Thread
Page Caching Plugin - by n00dles101 - 2010-12-17, 01:49:08
Page Caching Plugin - by n00dles101 - 2010-12-17, 02:34:35
Page Caching Plugin - by Carlos - 2010-12-18, 01:28:54
Page Caching Plugin - by yojoe - 2010-12-19, 22:28:35
Page Caching Plugin - by n00dles101 - 2010-12-20, 09:53:03
Page Caching Plugin - by yojoe - 2010-12-20, 14:30:56
Page Caching Plugin - by Carlos - 2011-04-25, 07:04:29
Page Caching Plugin - by Carlos - 2011-04-29, 20:15:10
Page Caching Plugin - by n00dles101 - 2011-05-01, 03:36:10
Page Caching Plugin - by Carlos - 2011-05-01, 16:37:39
Page Caching Plugin - by mvlcek - 2011-05-01, 16:51:14
Page Caching Plugin - by n00dles101 - 2011-05-02, 09:25:22
Page Caching Plugin - by Carlos - 2011-05-02, 16:26:12
Page Caching Plugin - by n00dles101 - 2011-05-02, 20:11:03
Page Caching Plugin - by Carlos - 2011-05-03, 06:00:03
Page Caching Plugin - by RobA - 2011-05-04, 00:16:54
Page Caching Plugin - by n00dles101 - 2011-05-04, 07:53:20
Page Caching Plugin - by Oleg06 - 2011-05-04, 18:17:44
Page Caching Plugin - by n00dles101 - 2011-05-04, 19:10:04
Page Caching Plugin - by Oleg06 - 2011-05-05, 00:39:50
Page Caching Plugin - by RobA - 2011-09-22, 06:45:22



Users browsing this thread: 1 Guest(s)