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 4y ago1 watchersCompare

[ Source](https://github.com/mageproger/mongocache)[ Packagist](https://packagist.org/packages/mageproger/mongocache)[ RSS](/packages/mageproger-mongocache/feed)WikiDiscussions master Synced 1w 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

Maturity26

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

[iazaran/smart-cache

Smart Cache is a caching optimization package designed to enhance the way your Laravel application handles data caching. It intelligently manages large data sets by compressing, chunking, or applying other optimization strategies to keep your application performant and efficient.

21114.2k](/packages/iazaran-smart-cache)[phpfastcache/phpssdb

PHP SSDB Driver for phpFastCache

14736.9k1](/packages/phpfastcache-phpssdb)[rapidwebltd/rw-file-cache

RW File Cache is a PHP File-based Caching Library. Its syntax is designed to closely resemble the PHP memcache extension.

15196.8k7](/packages/rapidwebltd-rw-file-cache)[yuzuru-s/redis-recommend

Wrapping Redis's sorted set APIs for specializing recommending operations.

392.9k](/packages/yuzuru-s-redis-recommend)[ichhabrecht/intcache

Turn uncachable page objects into cacheable links

193.9k](/packages/ichhabrecht-intcache)

PHPackages © 2026

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