core
Packages
Interfaces
Classes
Files

Class: Cache

Source Location: /core/cache.class.php [line 39]

Class Overview


This class is the cache manager of PHPBoost. Its functioning is very particular. Loading a file is equivalent to include the file. The cache file must define some PHP global variables. They will be usable in the execution context of the page. You should read on the PHPBoost website the documentation which explains you how to integrate a cache for you module, it's too much complex to be explained here.

Author(s):



Class Details

This class is the cache manager of PHPBoost. Its functioning is very particular. Loading a file is equivalent to include the file. The cache file must define some PHP global variables. They will be usable in the execution context of the page. You should read on the PHPBoost website the documentation which explains you how to integrate a cache for you module, it's too much complex to be explained here.

Tags:

[ Top ] - [ Class Details ] - [ Methods ] - [ Variables ]


Class Methods

constructor Cache [line 44]

Cache Cache( )
Builds a Cache object. Check if the directory in which the cache is written is writable.
[ Top ] - [ Class Details ] - [ Methods ] - [ Variables ]

method delete_file [line 199]

true delete_file( string $file)
Deletes a cache file.

Tags:

  • return: if the file could be deleted, false otherwise.

Parameters:

string   $file   Name of the file to delete.
[ Top ] - [ Class Details ] - [ Methods ] - [ Variables ]

method generate_all_files [line 164]

void generate_all_files( )
Regenerates all the cache files managed by the PHPBoost cache manager. This method needs a lot of resource, call it only when you are sure you need it.
[ Top ] - [ Class Details ] - [ Methods ] - [ Variables ]

method generate_all_modules [line 178]

void generate_all_modules( )
Generates all the module cache files.
[ Top ] - [ Class Details ] - [ Methods ] - [ Variables ]

method generate_file [line 133]

void generate_file( string $file)
Generates a file according to the specified method.

Parameters:

string   $file   The name of the file to generate.
[ Top ] - [ Class Details ] - [ Methods ] - [ Variables ]

method generate_module_file [line 143]

void generate_module_file( string $module_name, [bool $no_alert_on_error = false])
Generates a module file

Parameters:

string   $module_name   Name of the module for which you want to generate the cache.
bool   $no_alert_on_error   true if you want to display the generation error, false otherwise.
[ Top ] - [ Class Details ] - [ Methods ] - [ Variables ]

method load [line 61]

void load( string $file, [bool $reload_cache = false])
Loads a file file.

Parameters:

string   $file   Identifier of the cache file (for example the name of your module).
bool   $reload_cache   If the cache file may have been already loaded, RELOAD_CACHE force it to be reloaded, for example if the file has been updated since the first loading.
[ Top ] - [ Class Details ] - [ Methods ] - [ Variables ]

method write [line 216]

void write( string $module_name, &$cache_string, string $cache_string)
Writes a cache file.

Parameters:

string   $module_name   Name of the file to write
string   $cache_string   Content of the file to write
   &$cache_string  
[ Top ] - [ Class Details ] - [ Methods ] - [ Variables ]


Class Variables

[line 656]   static string[]  $files  = array('config', 'debug', 'modules', 'menus', 'htaccess', 'themes', 'langs', 'css', 'day', 'groups', 'member', 'uploads', 'com', 'ranks', 'writingpad', 'smileys', 'stats')

Tags:

    [ Top ] - [ Class Details ] - [ Methods ] - [ Variables ]
    Documentation generated on Tue, 28 Jul 2009 22:43:35 +0200 by phpDocumentor 1.4.1