PHPackages                             paragonie/easydb-cache - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Database &amp; ORM](/categories/database)
4. /
5. paragonie/easydb-cache

ActiveLibrary[Database &amp; ORM](/categories/database)

paragonie/easydb-cache
======================

Caching Adapter for EasyDB (caches Prepared Statements to reduce round trips)

v2.2.0(8mo ago)3223.2k↑38.9%42MITPHPPHP ^8CI failing

Since Aug 15Pushed 8mo ago4 watchersCompare

[ Source](https://github.com/paragonie/easydb-cache)[ Packagist](https://packagist.org/packages/paragonie/easydb-cache)[ RSS](/packages/paragonie-easydb-cache/feed)WikiDiscussions master Synced 2d ago

READMEChangelog (10)Dependencies (6)Versions (12)Used By (2)

EasyDB (Caching)
================

[](#easydb-caching)

[![Build Status](https://github.com/paragonie/easydb-cache/actions/workflows/ci.yml/badge.svg)](https://github.com/paragonie/easydb-cache/actions)[![Latest Stable Version](https://camo.githubusercontent.com/1f1528b2edd0e0c200e9eb9655e77451dba1f7ce5740484db9c18cc8e603e952/68747470733a2f2f706f7365722e707567782e6f72672f70617261676f6e69652f6561737964622d63616368652f762f737461626c65)](https://packagist.org/packages/paragonie/easydb-cache)[![Latest Unstable Version](https://camo.githubusercontent.com/ae752ac8cb96ec97b7c9e3ebbad768bdf788341cbd7ad0216be71e039b2b2650/68747470733a2f2f706f7365722e707567782e6f72672f70617261676f6e69652f6561737964622d63616368652f762f756e737461626c65)](https://packagist.org/packages/paragonie/easydb-cache)[![License](https://camo.githubusercontent.com/2a2ce6fe4d73b116389730825d07c808faee1fa1e774982da225b3c1fc8ea85d/68747470733a2f2f706f7365722e707567782e6f72672f70617261676f6e69652f6561737964622d63616368652f6c6963656e7365)](https://packagist.org/packages/paragonie/easydb-cache)[![Downloads](https://camo.githubusercontent.com/08dba5c5ddc484412051bf64f98a8cd36eb14aa5560c92bf4ddc4e0574f18bee/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f70617261676f6e69652f6561737964622d63616368652e737667)](https://packagist.org/packages/paragonie/easydb-cache)

Extends [EasyDB](https://github.com/paragonie/easydb), caches Prepared Statements to reduce the number of database round trips. **Requires PHP 8.0 or newer.**

Installing
----------

[](#installing)

```
composer require paragonie/easydb-cache

```

Usage
-----

[](#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

[](#updating-import-statements)

```
- use ParagonIE\EasyDB\EasyDB;
+ use ParagonIE\EasyDB\EasyDBCache;
```

### Updating Your Code

[](#updating-your-code)

```
use ParagonIE\EasyDB\EasyDB;
+ use ParagonIE\EasyDB\EasyDBCache;

- $db = new EasyDB(
+ $db = new EasyDBCache(
```

### Named Constructor

[](#named-constructor)

```
+ use ParagonIE\EasyDB\EasyDBCache;

- $db = new EasyDB(/* ... */);
+ $db = EasyDBCache::fromEasyDB(new EasyDB(/* ... */));
```

Support Contracts
-----------------

[](#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](https://paragonie.com/enterprise).

###  Health Score

49

—

FairBetter than 94% of packages

Maintenance60

Regular maintenance activity

Popularity38

Limited adoption so far

Community19

Small or concentrated contributor base

Maturity65

Established project with proven stability

 Bus Factor1

Top contributor holds 92% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~226 days

Recently: every ~282 days

Total

11

Last Release

253d ago

Major Versions

v0.2.0 → v1.0.02020-01-20

v1.0.1 → v2.0.02022-09-19

v1.0.2 → v2.0.12022-09-19

PHP version history (3 changes)v0.1.0PHP ^7.2

v1.0.1PHP ^7.2|^8

v2.0.0PHP ^8

### Community

Maintainers

![](https://www.gravatar.com/avatar/05d241256cda885139a5697d3bb536b5cec3b430c1adb9c524bf92a37a55758d?d=identicon)[paragonie-scott](/maintainers/paragonie-scott)

---

Top Contributors

[![paragonie-security](https://avatars.githubusercontent.com/u/15914520?v=4)](https://github.com/paragonie-security "paragonie-security (23 commits)")[![erikn69](https://avatars.githubusercontent.com/u/4933954?v=4)](https://github.com/erikn69 "erikn69 (1 commits)")[![jeijei4](https://avatars.githubusercontent.com/u/21228328?v=4)](https://github.com/jeijei4 "jeijei4 (1 commits)")

---

Tags

securitydatabasesqlpdocaching

###  Code Quality

TestsPHPUnit

Static AnalysisPsalm

Code StylePHP\_CodeSniffer

Type Coverage Yes

### Embed Badge

![Health badge](/badges/paragonie-easydb-cache/health.svg)

```
[![Health](https://phpackages.com/badges/paragonie-easydb-cache/health.svg)](https://phpackages.com/packages/paragonie-easydb-cache)
```

###  Alternatives

[paragonie/easydb

Easy-to-use database abstraction

740283.0k24](/packages/paragonie-easydb)[clouddueling/mysqldump-php

PHP version of mysqldump cli that comes with MySQL

1.3k23.2k](/packages/clouddueling-mysqldump-php)[delight-im/db

Safe and convenient SQL database access in a driver-agnostic way

50174.0k7](/packages/delight-im-db)[cocur/nqm

Named Query Manager helps you SQL organise queries in files.

285.6k](/packages/cocur-nqm)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
