Login   Register  
PHP Classes
elePHPant
Icontem

Cache DBA: Store cache data from flat file databases

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  Info   Screenshots Screenshots   View files View files (29)   DownloadInstall with Composer Download .zip   Reputation   Support forum   Blog    
Last Updated Ratings Unique User Downloads Download Rankings  
2014-05-02 (6 months ago) RSS 2.0 feedNot yet rated by the usersTotal: 393 All time: 5,965 This week: 956Up
Version License PHP version Categories  
cache-dba 1.1BSD License5.0PHP 5, Databases, Cache
Description Author  

This class can store and retrieve cache data from flat file databases.

It takes a given object and stores its serialized information as a string of data in flat file database using the DBA extension.

The class can also retrieve and unserialize the previously stored object from the cache database file if the cache file exists and it did not expire.

It can also delete existing cache entries explicitly. A separate class exists to automatically delete all expired cache database entries.

Innovation Award  
PHP Programming Innovation award nominee
March 2011
Number 4
Caching is a technique often used to save time generating only certain content once, store it somewhere and then retrieve it from storage next time it is necessary, so you do not waste time regenerating every time it is needed.

Caching methods often use individual files, databases or memcached containers to store cached content.

This class uses a slightly different type of container to store cached data: a flat file database. This way it can store many cache entries in a single file, making it fast to lookup the existence of a cache entry, while preserving the benefits of storing cached content in a local files.

Manuel Lemos
Picture of Gjero Krsteski
Name: Gjero Krsteski <contact>
Classes: 3 packages by
Country: Germany Germany
Age: 35
All time rank: 1835118 in Germany Germany
Week rank: 820 Up37 in Germany Germany Up
Innovation award
Innovation award
Nominee: 1x

Screenshots  
  • php-cache-dba-monitor.jpg
  Files folder image Files  
File Role Description
Files folder imageapp (5 files)
Files folder imagesrc (4 files)
Files folder imagetests (4 files, 1 directory)
Plain text file .editorconfig Data Auxiliary data
Plain text file .scrutinizer.yml Data Auxiliary data
Plain text file .travis.yml Data Auxiliary data
Plain text file bootstrap.php Class Class source
Plain text file composer.json Data Auxiliary data
Plain text file make-million.php Class Class source
Plain text file phpunit.xml Data Auxiliary data
Plain text file README.markdown Data Auxiliary data

  Files folder image Files  /  app  
File Role Description
  Plain text file .htaccess Data Auxiliary data
  Plain text file bootstrap-responsive.min.css Data Auxiliary data
  Plain text file bootstrap.min.css Data Auxiliary data
  Plain text file config.php Class Class source
  Plain text file index.php Class Class source

  Files folder image Files  /  src  
File Role Description
  Plain text file Cache.php Class Class source
  Plain text file Capsule.php Class Class source
  Plain text file Pack.php Class Class source
  Plain text file Sweep.php Class Class source

  Files folder image Files  /  tests  
File Role Description
Files folder imageHandlers (8 files)
  Plain text file CacheDefaultTest.php Test Unit test script
  Plain text file DummyFixtures.php Class Class source
  Plain text file PackTest.php Class Class source
  Plain text file SweepTest.php Class Class source

  Files folder image Files  /  tests  /  Handlers  
File Role Description
  Plain text file CdbReadTest.php Class Class source
  Plain text file CdbWriteTest.php Class Class source
  Plain text file Db4Test.php Class Class source
  Plain text file FlatfileTest.php Class Class source
  Plain text file GdbmTest.php Class Class source
  Plain text file InifileTest.php Class Class source
  Plain text file QdbmTest.php Class Class source
  Plain text file TestCase.php Class Class source

 Version Control Unique User Downloads Download Rankings  
 96%Total:393All time:5,965
 This week:0This week:956Up