PHPackages                             sormagec/laravel-mongo-cacheable - 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. sormagec/laravel-mongo-cacheable

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

sormagec/laravel-mongo-cacheable
================================

Sormagec Mongo Cacheable is a granular, intuitive, and fluent caching system for eloquent mongodb models. Simple, but yet powerful, plug-n-play with no hassle.

v1.0.4(7y ago)06MITPHPPHP ^7.1.3

Since Jan 18Pushed 7y ago1 watchersCompare

[ Source](https://github.com/bsormagec/laravel-cacheable)[ Packagist](https://packagist.org/packages/sormagec/laravel-mongo-cacheable)[ RSS](/packages/sormagec-laravel-mongo-cacheable/feed)WikiDiscussions master Synced 2d ago

READMEChangelog (2)Dependencies (7)Versions (10)Used By (0)

Sormagec MongoDB Cacheable
==========================

[](#sormagec-mongodb-cacheable)

**Sormagec MongoDB Cacheable** is a granular, intuitive, and fluent caching system for eloquent models. Simple, but yet powerful, plug-n-play with no hassle.

What this package do -technically- caching eloquent query passing through the `get` method, whatever it is and it's smart enough to indicated any conditions, limit, offset, wheres, orders, groups, ..etc and take that criteria into account when caching and checking for cached version. Also by default any create, update, or delete event will flush all cache for that specific model. It uses default Laravel caching system, and utilizes whatever cache driver you are using. Awesome, right?

Installation &amp; Usage
------------------------

[](#installation--usage)

1. Install the package via composer:

    ```
    composer require sormagec/laravel-cacheable
    ```
2. Use the `\Sormagec\Cacheable\CacheableEloquent` in your desired model, and you're done!
3. Seriously, that's it!

Check the [`CacheableEloquent`](src/CacheableEloquent.php) source code for more awesome stuff if you need advanced control.

Optional Features
-----------------

[](#optional-features)

You can optionally override model caching behaviour per model as follows:

```
    /**
     * Indicate if the model cache clear is enabled.
     *
     * @var bool
     */
    protected $cacheClearEnabled = true;

    /**
     * The model cache driver.
     *
     * @var string
     */
    protected $cacheDriver = 'memcached';

    /**
     * The model cache lifetime.
     *
     * @var int
     */
    protected $cacheLifetime = -1;
```

License
-------

[](#license)

This software is released under [The MIT License (MIT)](LICENSE).

(c) 2016-2019 Rinvex LLC, Some rights reserved.

###  Health Score

27

—

LowBetter than 49% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity4

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity64

Established project with proven stability

 Bus Factor1

Top contributor holds 95.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 ~90 days

Recently: every ~25 days

Total

9

Last Release

2678d ago

Major Versions

v0.0.4 → v1.0.02018-10-05

PHP version history (2 changes)v0.0.1PHP ^7.0.0

v0.0.3PHP ^7.1.3

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/46748527?v=4)[sormagec](/maintainers/sormagec)[@sormagec](https://github.com/sormagec)

---

Top Contributors

[![Omranic](https://avatars.githubusercontent.com/u/406705?v=4)](https://github.com/Omranic "Omranic (101 commits)")[![bsormagec](https://avatars.githubusercontent.com/u/965219?v=4)](https://github.com/bsormagec "bsormagec (5 commits)")

---

Tags

laravelmodeleloquenttraitcachequeryfluentcacheableintuitivegranularsormagec

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/sormagec-laravel-mongo-cacheable/health.svg)

```
[![Health](https://phpackages.com/badges/sormagec-laravel-mongo-cacheable/health.svg)](https://phpackages.com/packages/sormagec-laravel-mongo-cacheable)
```

###  Alternatives

[mongodb/laravel-mongodb

A MongoDB based Eloquent model and Query builder for Laravel

7.1k7.2M71](/packages/mongodb-laravel-mongodb)[silber/bouncer

Eloquent roles and abilities.

3.6k4.4M25](/packages/silber-bouncer)[tucker-eric/eloquentfilter

An Eloquent way to filter Eloquent Models

1.8k4.8M26](/packages/tucker-eric-eloquentfilter)[dyrynda/laravel-model-uuid

This package allows you to easily work with UUIDs in your Laravel models.

4802.8M8](/packages/dyrynda-laravel-model-uuid)[spiritix/lada-cache

A Redis based, automated and scalable database caching layer for Laravel

591444.8k2](/packages/spiritix-lada-cache)[reedware/laravel-relation-joins

Adds the ability to join on a relationship by name.

2121.2M13](/packages/reedware-laravel-relation-joins)

PHPackages © 2026

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