PHPackages                             cache/mongodb-adapter - 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. cache/mongodb-adapter

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

cache/mongodb-adapter
=====================

A PSR-6 cache implementation using MongoDB. This implementation supports tags

1.3.0(4y ago)963.9k↓39.8%3MITPHPPHP &gt;=7.4CI failing

Since Jan 11Pushed 4y ago2 watchersCompare

[ Source](https://github.com/php-cache/mongodb-adapter)[ Packagist](https://packagist.org/packages/cache/mongodb-adapter)[ Docs](http://www.php-cache.com/en/latest/)[ RSS](/packages/cache-mongodb-adapter/feed)WikiDiscussions master Synced 2d ago

READMEChangelog (7)Dependencies (6)Versions (8)Used By (0)

MongoDB PSR-6 Cache pool
========================

[](#mongodb-psr-6-cache-pool)

[![Gitter](https://camo.githubusercontent.com/2ded3ed1778dcfc9af5e2dfaad55e176ade49082cb6ea757169cc5ea23bf32ac/68747470733a2f2f6261646765732e6769747465722e696d2f7068702d63616368652f63616368652e737667)](https://gitter.im/php-cache/cache?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge)[![Latest Stable Version](https://camo.githubusercontent.com/1e74a144aff5a254b8e4fc3f3ff7308699cc2b37bb716f8898f5a0268aa6dd4d/68747470733a2f2f706f7365722e707567782e6f72672f63616368652f6d6f6e676f64622d616461707465722f762f737461626c65)](https://packagist.org/packages/cache/mongodb-adapter)[![codecov.io](https://camo.githubusercontent.com/5f9a5e80d0d3b2efd90cc0b5696318a4e75a23212d554f0d4fb7df47ff6904e4/68747470733a2f2f636f6465636f762e696f2f6769746875622f7068702d63616368652f6d6f6e676f64622d616461707465722f636f7665726167652e7376673f6272616e63683d6d6173746572)](https://codecov.io/github/php-cache/mongodb-adapter?branch=master)[![Total Downloads](https://camo.githubusercontent.com/339c2e95d160b1b34d4365ef7bf603daf659982826bd8c164b4cb882fdc3167b/68747470733a2f2f706f7365722e707567782e6f72672f63616368652f6d6f6e676f64622d616461707465722f646f776e6c6f616473)](https://packagist.org/packages/cache/mongodb-adapter)[![Monthly Downloads](https://camo.githubusercontent.com/bcaa4b5e60a3a8f07e5d14afbd818f19d493cbccdc1fa0e81150c692c9ad0b26/68747470733a2f2f706f7365722e707567782e6f72672f63616368652f6d6f6e676f64622d616461707465722f642f6d6f6e74686c792e706e67)](https://packagist.org/packages/cache/mongodb-adapter)[![Software License](https://camo.githubusercontent.com/55c0218c8f8009f06ad4ddae837ddd05301481fcf0dff8e0ed9dadda8780713e/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d627269676874677265656e2e7376673f7374796c653d666c61742d737175617265)](LICENSE)

This is a PSR-6 cache implementation using MongoDB. It is a part of the PHP Cache organisation. To read about features like tagging and hierarchy support please read the shared documentation at [www.php-cache.com](http://www.php-cache.com).

### Install

[](#install)

```
composer require cache/mongodb-adapter
```

### Use

[](#use)

```
$manager = new Manager('mongodb://'.getenv('MONGODB_HOST'));
$collection = MongoDBCachePool::createCollection($manager, 'localhost:27017', 'psr6test.cache');

$pool = new MongoDBCachePool($collection);
```

### Contribute

[](#contribute)

Contributions are very welcome! Send a pull request to the [main repository](https://github.com/php-cache/cache) or report any issues you find on the [issue tracker](http://issues.php-cache.com).

###  Health Score

39

—

LowBetter than 84% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity37

Limited adoption so far

Community16

Small or concentrated contributor base

Maturity68

Established project with proven stability

 Bus Factor1

Top contributor holds 70.3% 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 ~366 days

Recently: every ~442 days

Total

7

Last Release

1631d ago

Major Versions

0.3.0 → 1.0.02017-07-16

PHP version history (4 changes)0.1.0PHP ^5.5|^7.0

0.3.0PHP ^5.6 || ^7.0

1.2.0PHP ^5.6 || ^7.0 || ^8.0

1.3.0PHP &gt;=7.4

### Community

Maintainers

![](https://www.gravatar.com/avatar/401ccc5eea13c60cf807ae982af00e368e2166e2f26d8eb541dcd881a57385bc?d=identicon)[Nyholm](/maintainers/Nyholm)

---

Top Contributors

[![Nyholm](https://avatars.githubusercontent.com/u/1275206?v=4)](https://github.com/Nyholm "Nyholm (45 commits)")[![cryptiklemur](https://avatars.githubusercontent.com/u/896295?v=4)](https://github.com/cryptiklemur "cryptiklemur (7 commits)")[![prisis](https://avatars.githubusercontent.com/u/2716058?v=4)](https://github.com/prisis "prisis (4 commits)")[![ruudk](https://avatars.githubusercontent.com/u/104180?v=4)](https://github.com/ruudk "ruudk (4 commits)")[![maidmaid](https://avatars.githubusercontent.com/u/4578773?v=4)](https://github.com/maidmaid "maidmaid (2 commits)")[![florianv](https://avatars.githubusercontent.com/u/1586668?v=4)](https://github.com/florianv "florianv (1 commits)")[![StephenClouse](https://avatars.githubusercontent.com/u/468025?v=4)](https://github.com/StephenClouse "StephenClouse (1 commits)")

---

Tags

cachepsr-6mongodbtag

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/cache-mongodb-adapter/health.svg)

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

###  Alternatives

[mongodb/laravel-mongodb

A MongoDB based Eloquent model and Query builder for Laravel

7.1k8.4M96](/packages/mongodb-laravel-mongodb)[phpfastcache/phpfastcache

PHP Abstract Cache Class - Reduce your database call using cache system. Phpfastcache handles a lot of drivers such as Apc(u), Cassandra, CouchBase, Couchdb, Dynamodb, Firestore, Mongodb, Files, (P)redis, Leveldb, Memcache(d), Ravendb, Ssdb, Sqlite, Wincache, Xcache, Zend Data Cache.

2.5k5.3M141](/packages/phpfastcache-phpfastcache)[doctrine/mongodb-odm

PHP Doctrine MongoDB Object Document Mapper (ODM) provides transparent persistence for PHP objects to MongoDB.

1.1k24.5M359](/packages/doctrine-mongodb-odm)[matthiasmullie/scrapbook

Scrapbook is a PHP cache library, with adapters for e.g. Memcached, Redis, Couchbase, APCu, SQL and additional capabilities (e.g. transactions, stampede protection) built on top.

3232.8M45](/packages/matthiasmullie-scrapbook)[shopware/core

Shopware platform is the core for all Shopware ecommerce products.

585.6M572](/packages/shopware-core)[cache/doctrine-adapter

A PSR-6 cache implementation using Doctrine. This implementation supports tags

131.1M21](/packages/cache-doctrine-adapter)

PHPackages © 2026

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