paragonie/easydb-cache
Caching Adapter for EasyDB (caches Prepared Statements to reduce round trips)
Maintainers
Requires
- php: ^8
- ext-pdo: *
- paragonie/easydb: ^3
- paragonie/hidden-string: ^2
- paragonie/sodium_compat: ^1.21|^2
Requires (Dev)
- phpunit/phpunit: ^9
- squizlabs/php_codesniffer: ^2.7
- vimeo/psalm: ^4
Suggests
None
Provides
None
Conflicts
None
Replaces
None
MIT 5fd9b450ecdaaa4c2696f1223e6a0211211b7ebd
- Scott Arciszewski <scott.woop@paragonie.com>
- Woody Gilk
- SignpostMarv
README
👁 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 8.0 or newer.
Installing
composer require paragonie/easydb-cache
Usage
To use EasyDB with prepared statement caching, you can either change the class you're importing
in your code, or update your code to use EasyDBCache instead. Alternatively, you can use the
named constructor with your existing object.
Afterwards, the EasyDB API is exactly the same as EasyDBCache.
Updating Import Statements
- use ParagonIE\EasyDB\EasyDB; + use ParagonIE\EasyDB\EasyDBCache;
Updating Your Code
use ParagonIE\EasyDB\EasyDB; + use ParagonIE\EasyDB\EasyDBCache; - $db = new EasyDB( + $db = new EasyDBCache(
Named Constructor
+ use ParagonIE\EasyDB\EasyDBCache; - $db = new EasyDB(/* ... */); + $db = EasyDBCache::fromEasyDB(new EasyDB(/* ... */));
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.
