PHP Classes
elePHPant
Icontem

sqlCache API Library: Cache database query results in files

Recommend this page to a friend!
  Info   Screenshots Screenshots   View files View files (9)   DownloadInstall with Composer Download .zip   Reputation   Support forum (1)   Blog    
Last Updated Ratings Unique User Downloads Download Rankings
2005-10-24 (11 years ago) RSS 2.0 feedStarStarStarStar 76%Total: 1,324 This week: 3All time: 2,818 This week: 377Up
Version License Categories
sqlcache 1.0.0GNU General Publi...Databases, Cache
Description Author

This package can be used to cache the results of SQL database query results in files.

The idea is to increase database application performance by avoided to access databases to retrieve the results of queries being executed repeatedly.

This package provides an API that encapsulates the execution and caching of SQL database queries that maybe executed by several types of database APIs. Currently it supports supports AdoDB and PHPBB DAL.

The package stores cached result sets in files and one table of the database for indexing.

Picture of Dmitry Sheiko
Name: Dmitry Sheiko <contact>
Classes: 9 packages by
Country: Belarus Belarus
Innovation award
Innovation award
Nominee: 5x

Winner: 1x

Details
SQL Caching API Library

Are there troubles with your DB performance? Use SQL Caching API Library.
This library extends a DB Abstract Layer API up to SQL Caching ability. SQL Caching API Library 1.0 supports AdoDB (http://adodb.sf.net) and PHPBB DAL (http://phpbb.com). 
As far as you see in the examples you have to initiate a DB connection by means of the sqlAPI class constructor. You can use the getFetchListing() method of this class for any SQL query, which returns a set of data rows. If you wish to use caching, you suffice to add APPLYCACHE parameter. Also you must apply modify method for every modifying SQL query.  You may get the trace log from TraceInfo array. The cleanCache method allows to clean cache.
The library uses files for cache storage and one table of DB for indexing. You can rewrite this API in order to cache is kept in server shared memory (see http://php.net/shmop_open/) 

How install?
Restore test.sql dump into your DB. Create /cache/ folder and set up 777 permission to it. Copy into /adodb/ folder AdoDB files or copy into /phpbb_dbapi/ folder PHPBB DAL files. If you don’t use any DAL API copy into /phpbb_dbapi/ folder mysql.php and execute phpbb_sample.php.
Screenshots  
  • sqlCacheModel2.gif
  • sqlCacheModel1.gif
  Files folder image Files  
File Role Description
Files folder imagecache (1 file)
Files folder imagephpbb_dbapi (1 file)
Plain text file adodb.sqlapi.lib Class SQL API Extension of AdoDB
Plain text file adodb_sample.php Example Sample of ADODB SQL Caching extension
Plain text file phpbb.sqlapi.lib.php Class SQL API Extension of PHPBB DAL
Plain text file phpbb_sample.php Example Sample of PHPBB DAL SQL Caching extension
Plain text file readme.txt Doc. Short documentation
Plain text file sqlcache.lib.php Class SQL Cache Class Library
Plain text file test.sql Data Sample of DB

  Files folder image Files  /  cache  
File Role Description
  Plain text file index.php Example Cache folder (it needs 777 permission)

  Files folder image Files  /  phpbb_dbapi  
File Role Description
  Plain text file mysql.php Example PHPBB MySQL Layer for example

 Version Control Unique User Downloads Download Rankings  
 0%
Total:1,324
This week:3
All time:2,818
This week:377Up
User Ratings User Comments (1)
 All time
Utility:100%StarStarStarStarStarStar
Consistency:93%StarStarStarStarStar
Documentation:81%StarStarStarStarStar
Examples:87%StarStarStarStarStar
Tests:-
Videos:-
Overall:76%StarStarStarStar
Rank:81
 
Excellent
7 years ago (kishore kumar)
80%StarStarStarStarStar