| 
 
Class pagecache

File: /components/com_pagecache/pagecache.class.php

Static Method startup()

Performs basic startup functions for PageCache, including fetching a page from cache for display

Static Method checkEnable()

Checks multiple variable to see if the component should be enabled or not

Static Method process($data,$info)

Takes $data (HTML for the page), and $info (associative array of info about the page), and processes it prior to displaying the cached version of the page.  Calls trigger "process".

Static Method checkClear()

Basically a wrapper to call the "clear" triggers.

Static Method store($body)

Takes $body (HTML for page), and prepares it to be stored.  It also generates the $info array for the page.  Calls trigger "store".  Returns true on successful store, false on failure.

 Static Method triggerMods($mod, &$data, &$info)

Takes $mod (module name to be triggered), computes the list of modules to be triggerd, then calls triggerMod() for each one. ($data and $info are passed through).

Static Method triggerMod($mod, &$data, &$info, $scope)

Calls module named $mod, with trigger named $scope.  Returns $data and $info by reference to triggerMods();

Static Method checkHeaders($headers)

Checks to see that the $header array is valid, and strips out headers that shouldn't be cached.  Returns $header array on success, false on failure.

Static Method isUser()

Checks to see if user is logged in or not.  Returns true if user is NOT logged in, and false if user is logged in.

Static Method page_get_headers($url)

php4 compatability function.  Fetches headers sent by page, and returns them as an array.

Static Method infostore($info=null)

Stores $info durring execution of page (so data isn't lost if page is expired).

Static Method refresh_list($pagename)

A method to refresh $pagename (can be called multiple times for multiple pages) AFTER all processing is complete and the connection to the user is closed.

Static Method cron_register()

A method to refresh top $x (configurable in main configuration) pages AFTER all processing is complete and the connection to the user is closed.

Static Method cron()

Actually processes top $x page reload.  Call this method once to reload the entire cache. Note, this loads the cache immediately, so any current connection by a user will wait until the function ends.  Use cron_register() to reload the cache.

Static Method request($url)

Refreshes a single page (called by the cron() method) in the cache.  Note, this runs immediately, so any current user connection will wait until the function ends.  Use refresh_list($url) to refresh a page.

 

 
Next >
feed image
Copyright 2007 Anthony Ferrara, All Rights Reserved