PHPackages                             mageproger/mongocache - 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. [Caching](/categories/caching)
4. /
5. mageproger/mongocache

ActiveLibrary[Caching](/categories/caching)

mageproger/mongocache
=====================

Laravel cache MongoDB driver library

05PHP

Since Jun 26Pushed 3y ago1 watchersCompare

[ Source](https://github.com/mageproger/mongocache)[ Packagist](https://packagist.org/packages/mageproger/mongocache)[ RSS](/packages/mageproger-mongocache/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependenciesVersions (1)Used By (0)

Laravel MongoDB Cache Driver
============================

[](#laravel-mongodb-cache-driver)

This extension allows to store cache in MongoDB like memcache, redis, etc. in Laravel

Installation
------------

[](#installation)

The preferred method of installing this library is with [Composer](https://getcomposer.org/) by running the following from your project root:

```
$ composer require mageproger/mongocache

```

### Laravel without auto-discovery:

[](#laravel-without-auto-discovery)

If you don't use auto-discovery, add the CacheServiceProvider to the providers array in config/app.php

```
Mageproger\MongoCache\MongoCacheServiceProvider::class,
```

#### Copy the package config to your local config with the publish command:

[](#copy-the-package-config-to-your-local-config-with-the-publish-command)

```
php artisan vendor:publish --provider="Mageproger\MongoCache\MongoCacheServiceProvider"
```

#### Add config to config/cache.php:

[](#add-config-to-configcachephp)

```
'mongo' => [
            'driver' => 'mongo',
            'host' => env('MONGO_HOST'),
            'database' => env('MONGO_DATABASE'),
            'username' => env('MONGO_USERNAME'),
            'password' => env('MONGO_PASSWORD'),
            'collection' => env('MONGO_COLLECTION'),
            'prefix' => env('MONGO_PREFIX', ''),
        ],
```

Use cache as usual

###  Health Score

15

—

LowBetter than 3% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity4

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity25

Early-stage or recently created project

 Bus Factor1

Top contributor holds 100% 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.

### Community

Maintainers

![](https://www.gravatar.com/avatar/7ad697bca1b78680ae1e3ccaad79b6803f4d90790de932f1a44a15fc1b5c4c16?d=identicon)[mageproger](/maintainers/mageproger)

---

Top Contributors

[![mageproger](https://avatars.githubusercontent.com/u/2272527?v=4)](https://github.com/mageproger "mageproger (6 commits)")

### Embed Badge

![Health badge](/badges/mageproger-mongocache/health.svg)

```
[![Health](https://phpackages.com/badges/mageproger-mongocache/health.svg)](https://phpackages.com/packages/mageproger-mongocache)
```

###  Alternatives

[predis/predis

A flexible and feature-complete Redis/Valkey client for PHP.

7.8k305.7M2.4k](/packages/predis-predis)[snc/redis-bundle

A Redis bundle for Symfony

1.0k39.4M67](/packages/snc-redis-bundle)[react/cache

Async, Promise-based cache interface for ReactPHP

444112.4M40](/packages/react-cache)[wp-media/wp-rocket

Performance optimization plugin for WordPress

7431.3M3](/packages/wp-media-wp-rocket)[illuminate/cache

The Illuminate Cache package.

12835.6M1.4k](/packages/illuminate-cache)[colinmollenhour/php-redis-session-abstract

A Redis-based session handler with optimistic locking

6325.6M14](/packages/colinmollenhour-php-redis-session-abstract)

PHPackages © 2026

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