Class AlberTcache

(line 27)

Description


Located in File: /AlberT-cache.inc.php

Automatically handles the entire caching stuffs

It automagically handles everything concerning the caching mechanism: gzipping of the contents when the browser supports it, the browser cache validation, etc..



Class Variables

Summary:
mixed $absfile
mixed $also
mixed $crc32
mixed $data
mixed $dbg
mixed $expire
mixed $file
mixed $gcProb
mixed $gzcont
mixed $gzip
mixed $isOn
mixed $mask
mixed $oneSite
mixed $post
mixed $size
mixed $storDir
mixed $timeout
mixed $variables

$absfile (line 41)

Data type : mixed

$also (line 34)

Data type : mixed

$crc32 (line 47)

Data type : mixed

$data (line 42)

Data type : mixed

$dbg (line 29)

Data type : mixed

$expire (line 33)

Data type : mixed

$file (line 44)

Data type : mixed

$gcProb (line 37)

Data type : mixed

$gzcont (line 45)

Data type : mixed

$gzip (line 30)

Data type : mixed

$isOn (line 38)

Data type : mixed

$mask (line 39)

Data type : mixed

$oneSite (line 35)

Data type : mixed

$post (line 31)

Data type : mixed

$size (line 46)

Data type : mixed

$storDir (line 36)

Data type : mixed

$timeout (line 32)

Data type : mixed

$variables (line 43)

Data type : mixed

Method Detail

Summary:
AlberTcache AlberTcache ()
void add_fs (mixed $file, mixed $data)
void cacheAll ([mixed $cachetime = 60])
void doFlush ()
void doGC ()
void doReset ()
void doWrite ()
void finalize (string $contents)
void getDefaultKey ()
void getDefaultObj ()
void getEncoding ()
void getStorage (mixed $cacheobject)
void get_fs (mixed $file)
void init ()
void lock_fs (mixed $fp, [mixed $mode = 'w'])
void pdebug (string $s)
void start ()
void storeVar (mixed $vn)
void theCache (mixed $cachetime, [mixed $key = NULL])
void unlock_fs (mixed $fp)

Constructor AlberTcache (line 52)

AlberTcache AlberTcache( )

Class constructor

Info

Method add_fs (line 190)

void add_fs( mixed $file, mixed $data)

Writes out the cache

Info

Method cacheAll (line 153)

void cacheAll( [mixed $cachetime = 60])

Caches the current page based on the page name and the GET/POST

variables. All must match or else it will not be fetched from the cache!

Info

Method doFlush (line 507)

void doFlush( )

doFlush()

Responsible for final flushing everything. Sets ETag-headers and returns "Not modified" when possible

When ETag doesn't match (or is invalid), it is tried to send the gzipped data. If that is also not possible, we sadly have to uncompress (assuming $CACHE_GZIP is on)

Info

Method doGC (line 231)

void doGC( )

Cache garbage collector

Info

Method doReset (line 81)

void doReset( )

Resets the cache state

Info

Method doWrite (line 369)

void doWrite( )

doWrite()

Does the actual caching

Info

Method finalize (line 474)

void finalize( string $contents)

finalize()

This function is called by the callback-funtion of the ob_start

Parameters

  • string $contents: the string representing the page to be flushed out to the client

Info

Method getDefaultKey (line 125)

void getDefaultKey( )

Generates the key for the request

Info

Method getDefaultObj (line 135)

void getDefaultObj( )

Returns the default object used by the helper functions

Info

Method getEncoding (line 398)

void getEncoding( )

getEncoding()

Are we capable of receiving gzipped data ? Returns the encoding that is accepted. Maybe additional check for Mac ?

Info

Method getStorage (line 223)

void getStorage( mixed $cacheobject)

Returns the storage for cache

Info

Method get_fs (line 207)

void get_fs( mixed $file)

Reads in the cache

Info

Method init (line 416)

void init( )

init()

Checks some global variables and might decide to disable caching and calls appropriate initialization-methods

Info

Method lock_fs (line 162)

void lock_fs( mixed $fp, [mixed $mode = 'w'])

Obtains a lock on the cache storage

Info

Method pdebug (line 108)

void pdebug( string $s)

A simple deguggig handler function

Parameters

  • string $s: The debugging message

Info

Method start (line 441)

void start( )

start()

Sets the handler for callback

Info

Method storeVar (line 95)

void storeVar( mixed $vn)

Saves a variable state between caching

Parameters

  • mixed $vn: the name of the variable to save

Info

Method theCache (line 281)

void theCache( mixed $cachetime, [mixed $key = NULL])

theCache()

Caches $object based on $key for $cachetime, will return 0 if the object has expired or does not exist.

Info

Method unlock_fs (line 182)

void unlock_fs( mixed $fp)

Performs the unlock

Info

Inherited Variables

Inherited Class Variable Summary

Inherited Methods

Inherited Method Summary


Documentation generated on Wed, 15 Dec 2004 15:11:09 +0100 by phpDocumentor 1.2.3