Class XFCache

Description

XFCache provides an abstraction for caching organized in pools

Located in /lb_private/class.cache.php (line 26)


	
			
Class Constant Summary
Variable Summary
static string $dir
static boolean $enable
Method Summary
static mixed get (string $a, [string $b = ''], [string $c = 'read'])
static string getdir ()
static boolean purge (string $a, [string $b = ''])
static boolean put (string $a, [string $b = ''], [array $d = ''])
static boolean setdir (string $a)
static array statistic (string $a, [string $b = ''])
static mixed topic (integer $a, [string $b = ''])
static boolean topic_delta ( &$cache, string $op, array $data, array $cache)
Variables
static string $dir = '' (line 38)
  • var: absolute path to cache folder
  • access: protected
static boolean $enable = false (line 34)
  • var: cache enabled?
  • access: protected
Methods
static method get (line 90)

get a resource from cache

  • since: 1.0.0
  • access: public
static mixed get (string $a, [string $b = ''], [string $c = 'read'])
  • string $a: resource class
  • string $b: resource identifier
  • string $c: 'read' the content or return modification time 'mtime'
static method getdir (line 48)

get current cache folder

  • since: 1.0.0
  • access: public
static string getdir ()
static method purge (line 159)

remove a resource from cache

  • since: 1.0.0
  • access: public
static boolean purge (string $a, [string $b = ''])
  • string $a: resource class
  • string $b: resource identifier
static method put (line 124)

put content to cache

  • since: 1.0.0
  • access: public
static boolean put (string $a, [string $b = ''], [array $d = ''])
  • string $a: resource class
  • string $b: resource identifier
  • array $d: input stream
static method setdir (line 58)

set a folder for cache. obviously it has to be writeable...

  • since: 1.0.0
  • access: public
static boolean setdir (string $a)
  • string $a: full path
static method statistic (line 211)

calculate forum statistics and cache it

  • since: 1.0.0
  • access: public
static array statistic (string $a, [string $b = ''])
  • string $a: select section: 'post' or 'user'
  • string $b: options: 'rebuild'
static method topic (line 256)

fetches topic data from cache pool

if multiple are requested, they are precached *without* returning (use '*' for all) only single topic requests are returned from cache!

  • since: 1.0.0
  • access: public
static mixed topic (integer $a, [string $b = ''])
  • integer $a: topic id, single or multiple separated by comma
  • string $b: options: 'rebuild'
static method topic_delta (line 349)

make changes on topic cache without rebuilding it

  • since: 1.0.0
  • access: public
static boolean topic_delta ( &$cache, string $op, array $data, array $cache)
  • array $cache: resource array from XFCache::topic()
  • string $op: operations: add_reply, remove_reply, change_lock, change_attribute, change_rate, change_user
  • array $data: input data stream
  • &$cache
Class Constants
TOPIC_CACHE_VERSION = 0x01 (line 30)
  • var: revision id for topic cache

Documentation generated on Sat, 20 Jun 2009 12:42:55 +0200 by phpDocumentor 1.4.1