User Tools

Site Tools


config:caching-function

This is an old revision of the document!


Page Caching/Indexing

Introduction

As of version 3.1 Getsimple includes simple Caching/Indexing functions to help speed up page rendering.

The indexing file contains all information from each of your pages in one file (/data/other/pages.xml) which is made available to you in the Global $pagesArray Array.

Each time you edit or update a page the indexing file (/data/other/pages.xml) is updated.

Functions

The following functions are available

getPageContent($page)

Echos the content of the supplied $page to the screen.

getPageField($page,$field)

Echos the supplied $field from the given $page to the screen. If the $field supplied is 'content' getPageContent is called.

echoPageField($page,$field)

Alias of getPageField

returnPageContent($page)

Returns the content of the supplied page.

returnPageField($page,$field)

Returns the supplied $field from the given $page. If the $field supplied is 'content' returnPageContent is called.

getChildren($page)

Returns an array of child slugs of the given $page

getChildrenMulti($page,$options=array())

Returns an array of child pages with any additional options you want returned.

Hooks

caching-save

Allows plugins writers to add extra fields to the indexing file.

config/caching-function.1309127983.txt.gz · Last modified: 2013/04/19 14:55 (external edit)