PHP Classes

Easydb Cache: Cache database query prepared statements

Recommend this page to a friend!
  Info   View files Documentation   View files View files (9)   DownloadInstall with Composer Download .zip   Reputation   Support forum   Blog (1)    
Ratings Unique User Downloads Download Rankings
Not yet rated by the usersTotal: 89 This week: 1All time: 9,945 This week: 560Up
Version License PHP version Categories
easydb-cache 1.0MIT/X Consortium ...5PHP 5, Databases, Cache
Description 

Author

This class can cache database query prepared statements.

It extends the EasyDB database access cache to alter the way the prepared statements are processed to make it run faster.

On the first time the prepare function is called, it stores the results of the prepare function in a class variable.

Next time the prepare statement is run, it returns the values previous stored in the cache class variable.

Innovation Award
PHP Programming Innovation award nominee
January 2021
Number 6
Prepared statements are used to execute SQL queries from template strings. Those templates have marks which will be replaced by query parameter values before the query is executed.

Using prepared statements adds some overhead to the time it takes to execute a query because the query template string needs to be parsed first before the parameter values are replaced.

This class implements prepared query caching, so it avoids the overhead of parsing the same prepared statement query every time it needs to execute the same query, even if it uses different parameter values.

Manuel Lemos
Picture of Scott Arciszewski
  Performance   Level  
Name: Scott Arciszewski <contact>
Classes: 36 packages by
Country: United States United States
Age: ???
All time rank: 1180171 in United States United States
Week rank: 52 Up6 in United States United States Up
Innovation award
Innovation award
Nominee: 28x

Winner: 1x

Documentation

EasyDB (Caching)

Build Status Latest Stable Version Latest Unstable Version License Downloads

Extends EasyDB, caches Prepared Statements to reduce the number of database round trips. Requires PHP 7.2 or newer.

Support Contracts

If your company uses this library in their products or services, you may be interested in purchasing a support contract from Paragon Initiative Enterprises.


  Files folder image Files  
File Role Description
Files folder imagesrc (1 file)
Files folder imagetests (1 file)
Accessible without login Plain text file .php_cs Example Example script
Accessible without login Plain text file .travis.yml Data Auxiliary data
Accessible without login Plain text file composer.json Data Auxiliary data
Accessible without login Plain text file LICENSE Lic. License text
Accessible without login Plain text file phpunit.xml.dist Data Auxiliary data
Accessible without login Plain text file psalm.xml Data Auxiliary data
Accessible without login Plain text file README.md Doc. Documentation

  Files folder image Files  /  src  
File Role Description
  Accessible without login Plain text file EasyDBCache.php Class Class source

  Files folder image Files  /  tests  
File Role Description
  Accessible without login Plain text file EasyDBCacheTest.php Class Class source

 Version Control Unique User Downloads Download Rankings  
 100%
Total:89
This week:1
All time:9,945
This week:560Up