Class vB_Datastore_Filecache

Description

Class for fetching and initializing the vBulletin datastore from files

  • version: $Revision: 32878 $
  • date: $Date: 2009-10-28 13:38:49 -0500 (Wed, 28 Oct 2009) $

Located in /includes/class_datastore.php (line 597)

vB_Datastore
   |
   --vB_Datastore_Filecache
Variable Summary
Method Summary
 vB_Datastore_Filecache vB_Datastore_Filecache (vB_Registry &$registry, vB_Database &$dbobject)
 boolean atomic_move (string $sourcefile, string $destfile)
 void build (string $title, mixed $data)
 void fetch (array $items)
 mixed fetch_build (string $title)
 boolean lock ([string $title = ''])
 void unlock ([string $title = ''])
Variables
array $cacheableitems = array(
'options',
'bitfields',
'forumcache',
'usergroupcache',
'stylecache',
'languagecache',
'products',
'pluginlist',
)
(line 604)

Default items that are always loaded by fetch() when using the file method;

Inherited Variables

Inherited from vB_Datastore

vB_Datastore::$checked_options
vB_Datastore::$dbobject
vB_Datastore::$defaultitems
vB_Datastore::$prefix
vB_Datastore::$registered
vB_Datastore::$registry
Methods
Constructor vB_Datastore_Filecache (line 621)

Constructor - establishes the database object to use for datastore queries

vB_Datastore_Filecache vB_Datastore_Filecache (vB_Registry &$registry, vB_Database &$dbobject)
atomic_move (line 866)

Perform an atomic move where a request may occur before a file is written

boolean atomic_move (string $sourcefile, string $destfile)
  • string $sourcefile: Source Filename
  • string $destfile: Destination Filename
build (line 704)

Updates the appropriate cache file

void build (string $title, mixed $data)
  • string $title: title of the datastore item
  • mixed $data: The data associated with the title
fetch (line 638)

Fetches the contents of the datastore from cache files

void fetch (array $items)
  • array $items: Array of items to fetch from the datastore

Redefinition of:
vB_Datastore::fetch()
Fetches the contents of the datastore from the database
fetch_build (line 839)

Fetches the specified datastore item from the database and tries to update the file cache with it. Data is automatically unserialized.

  • return: Data from datastore (unserialized if fetched)
mixed fetch_build (string $title)
  • string $title: Datastore item to fetch
lock (line 795)

Obtains a lock for the datastore. Attempt to get the lock multiple times before failing.

boolean lock ([string $title = ''])
  • string $title: title of the datastore item
unlock (line 826)

Releases the datastore lock

void unlock ([string $title = ''])
  • string $title: title of the datastore item

Inherited Methods

Inherited From vB_Datastore

 vB_Datastore::vB_Datastore()
 vB_Datastore::check_options()
 vB_Datastore::do_db_fetch()
 vB_Datastore::fetch()
 vB_Datastore::prepare_itemarray()
 vB_Datastore::prepare_itemlist()
 vB_Datastore::register()

Documentation generated on Tue, 26 Jan 2010 15:15:07 -0600 by phpDocumentor 1.4.3