phpDocumentor Cotonti
[ class tree: Cotonti ] [ index: Cotonti ] [ all elements ]

Class: Page_cache

Source Location: /cache.php

Class Page_cache

Class Overview

A cache that stores entire page outputs. Disk-based.

Located in /cache.php [line 400]



		
		
		
		

Methods

[ Top ]
Method Summary
Page_cache   __construct()   Constructs controller object and sets basic configuration
int   clear()   Removes an item and all contained items and cache files
void   init()   Initializes actual page cache
void   read()   Reads the page cache object from disk and sends it to output.
void   write()   Writes output buffer contents to a cache image file

[ Top ]
Methods
Constructor __construct  [line 436]

  Page_cache __construct( string $dir, [int $perms = 0777]  )

Constructs controller object and sets basic configuration

Parameters:
string   $dir:  Cache directory
int   $perms:  Octal permission mask for cache directories

API Tags:
Access:  public


[ Top ]
clear  [line 447]

  int clear( string $path  )

Removes an item and all contained items and cache files

Parameters:
string   $path:  Item path

API Tags:
Return:  Number of files removed
Access:  public


[ Top ]
init  [line 459]

  void init( string $path, string $name, [array $exclude = array()], [string $ext = '']  )

Initializes actual page cache

Parameters:
string   $path:  Page path string
string   $name:  Short name for the cache file
array   $exclude:  A list of GET params to be excluded from consideration
string   $ext:  File extension

API Tags:
Access:  public


[ Top ]
read  [line 472]

  void read( )

Reads the page cache object from disk and sends it to output.

If the cache object does not exist, then just calculates the path for a following write() call.


API Tags:
Access:  public


[ Top ]
write  [line 503]

  void write( )

Writes output buffer contents to a cache image file


API Tags:
Access:  public


[ Top ]

Documentation generated on Fri, 19 Mar 2010 17:45:22 +0000 by phpDocumentor 1.4.3