Class Zend_Cache_Backend_Sqlite

Description

Implements interfaces:

  • copyright: Copyright (c) 2005-2007 Zend Technologies USA Inc. (http://www.zend.com)
  • license: New BSD License

Located in /Cache/Backend/Sqlite.php (line 40)

Zend_Cache_Backend
   |
   --Zend_Cache_Backend_Sqlite
Variable Summary
Method Summary
 Zend_Cache_Backend_Sqlite __construct ([array $options = array()])
 void __destruct ()
 boolean clean ([string $mode = Zend_Cache::CLEANING_MODE_ALL], [tags $tags = array()])
 string load (string $id, [boolean $doNotTestCacheValidity = false])
 boolean remove (string $id)
 boolean save (string $data, string $id, [array $tags = array()], [int $specificLifetime = false])
 mixed test (string $id)
 void ___expire (string $id)
Variables
array $_backwardCompatibilityArray = array(
'cacheDBCompletePath' => 'cache_db_complete_path',
'automaticVacuumFactor' => 'automatic_vacuum_factor'
)
(line 80)

backward compatibility becase of ZF-879 and ZF-1172 (it will be removed in ZF 1.1)

  • access: protected

Redefinition of:
Zend_Cache_Backend::$_backwardCompatibilityArray
backward compatibility becase of ZF-879 and ZF-1172 (it will be removed in ZF 1.1)
array $_options = array(
'cache_db_complete_path' => null,
'automatic_vacuum_factor' => 10
)
(line 63)

Available options

=====> (string) cache_db_complete_path :

  • the complete path (filename included) of the SQLITE database
====> (int) automatic_vacuum_factor :
  • Disable / Tune the automatic vacuum process
  • The automatic vacuum process defragment the database file (and make it smaller) when a clean() or delete() is called 0 => no automatic vacuum 1 => systematic vacuum (when delete() or clean() methods are called) x (integer) > 1 => automatic vacuum randomly 1 times on x clean() or delete()

  • var: available options
  • access: protected

Redefinition of:
Zend_Cache_Backend::$_options
Available options

Inherited Variables

Inherited from Zend_Cache_Backend

Zend_Cache_Backend::$_directives
Methods
Constructor __construct (line 94)

Constructor

  • access: public
Zend_Cache_Backend_Sqlite __construct ([array $options = array()])
  • array $options: associative array of options

Redefinition of:
Zend_Cache_Backend::__construct()
Constructor
Destructor __destruct (line 109)

Destructor

  • access: public
void __destruct ()
clean (line 225)

Clean some cache records

Available modes are : Zend_Cache::CLEANING_MODE_ALL (default) => remove all cache entries ($tags is not used) Zend_Cache::CLEANING_MODE_OLD => remove too old cache entries ($tags is not used) Zend_Cache::CLEANING_MODE_MATCHING_TAG => remove cache entries matching all given tags ($tags can be an array of strings or a single string) Zend_Cache::CLEANING_MODE_NOT_MATCHING_TAG => remove cache entries not {matching one of the given tags} ($tags can be an array of strings or a single string)

  • return: true if no problem
  • access: public
boolean clean ([string $mode = Zend_Cache::CLEANING_MODE_ALL], [tags $tags = array()])
  • string $mode: clean mode
  • tags $tags: array $tags array of tags

Implementation of:
Zend_Cache_Backend_Interface::clean()
Clean some cache records
load (line 121)

Test if a cache is available for the given id and (if yes) return it (false else)

  • return: cached datas (or false)
  • access: public
string load (string $id, [boolean $doNotTestCacheValidity = false])
  • string $id: cache id
  • boolean $doNotTestCacheValidity: if set to true, the cache validity won't be tested

Implementation of:
Zend_Cache_Backend_Interface::load()
Test if a cache is available for the given id and (if yes) return it (false else)
remove (line 200)

Remove a cache record

  • return: true if no problem
  • access: public
boolean remove (string $id)
  • string $id: cache id

Implementation of:
Zend_Cache_Backend_Interface::remove()
Remove a cache record
save (line 164)

Save some string datas into a cache record

Note : $data is always "string" (serialization is done by the core not by the backend)

  • return: true if no problem
  • access: public
boolean save (string $data, string $id, [array $tags = array()], [int $specificLifetime = false])
  • string $data: datas to cache
  • string $id: cache id
  • array $tags: array of strings, the cache record will be tagged by each string entry
  • int $specificLifetime: if != false, set a specific lifetime for this cache record (null => infinite lifetime)

Implementation of:
Zend_Cache_Backend_Interface::save()
Save some string datas into a cache record
test (line 141)

Test if a cache is available or not (for the given id)

  • return: false (a cache is not available) or "last modified" timestamp (int) of the available cache record
  • access: public
mixed test (string $id)
  • string $id: cache id

Implementation of:
Zend_Cache_Backend_Interface::test()
Test if a cache is available or not (for the given id)
___dropDatabaseFile (line 250)

PUBLIC METHOD FOR UNIT TESTING ONLY !

Unlink the database file

  • access: public
void ___dropDatabaseFile ()
___expire (line 239)

PUBLIC METHOD FOR UNIT TESTING ONLY !

Force a cache record to expire

  • access: public
void ___expire (string $id)
  • string $id: cache id

Inherited Methods

Inherited From Zend_Cache_Backend

 Zend_Cache_Backend::__construct()
 Zend_Cache_Backend::getLifetime()
 Zend_Cache_Backend::getTmpDir()
 Zend_Cache_Backend::isAutomaticCleaningAvailable()
 Zend_Cache_Backend::setDirectives()
 Zend_Cache_Backend::setOption()
 Zend_Cache_Backend::_log()
 Zend_Cache_Backend::_loggerSanity()

Documentation generated on Wed, 28 Nov 2007 15:48:20 -0600 by phpDocumentor 1.4.0