PHP Classes

Cache DBA: Store cache data from flat file databases

Recommend this page to a friend!
  Info   Screenshots Screenshots   View files View files (39)   DownloadInstall with Composer Download .zip   Reputation   Support forum   Blog    
Last Updated Ratings Unique User Downloads Download Rankings
2023-06-02 (4 months ago) RSS 2.0 feedNot enough user ratingsTotal: 469 All time: 6,016 This week: 242Up
Version License PHP version Categories
cache-dba 1.12BSD 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
  Performance   Level  
Name: Gjero Krsteski <contact>
Classes: 4 packages by
Country: Germany Germany
Age: 44
All time rank: 1594104 in Germany Germany
Week rank: 180 Up7 in Germany Germany Up
Innovation award
Innovation award
Nominee: 2x

Screenshots  
  • php-cache-dba-monitor.jpg
  Files folder image Files  
File Role Description
Files folder imageapp (5 files, 1 directory)
Files folder imagesrc (4 files)
Files folder imagetests (4 files, 1 directory)
Files folder imagevendor (1 file, 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
Files folder imageimg (2 files)
  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  /  app  /  img  
File Role Description
  Image file glyphicons-halflings-white.png Icon Icon image
  Image file glyphicons-halflings.png Icon Icon image

  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

  Files folder image Files  /  vendor  
File Role Description
Files folder imagecomposer (7 files)
  Plain text file autoload.php Aux. Auxiliary script

  Files folder image Files  /  vendor  /  composer  
File Role Description
  Plain text file autoload_classmap.php Aux. Auxiliary script
  Plain text file autoload_namespaces.php Aux. Auxiliary script
  Plain text file autoload_psr4.php Aux. Auxiliary script
  Plain text file autoload_real.php Class Class source
  Plain text file ClassLoader.php Class Class source
  Plain text file installed.json Data Auxiliary data
  Plain text file LICENSE Lic. License text

 Version Control Unique User Downloads Download Rankings  
 97%
Total:469
This week:0
All time:6,016
This week:242Up