PHPackages                             zvestaphp/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. zvestaphp/cacheable

ActiveLibrary

zvestaphp/cacheable
===================

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

0130PHP

Since Aug 30Pushed 6y ago1 watchersCompare

[ Source](https://github.com/zvestaphp/cacheable)[ Packagist](https://packagist.org/packages/zvestaphp/cacheable)[ RSS](/packages/zvestaphp-cacheable/feed)WikiDiscussions master Synced 2mo ago

READMEChangelogDependenciesVersions (1)Used By (0)

Rinvex Cacheable
================

[](#rinvex-cacheable)

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

[![Packagist](https://camo.githubusercontent.com/58866d794ab42b32d7c0a6aa3083935628ece327f58fd4ed889d669856946c17/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f72696e7665782f636163686561626c652e7376673f6c6162656c3d5061636b6167697374267374796c653d666c61742d737175617265)](https://packagist.org/packages/rinvex/cacheable)[![VersionEye Dependencies](https://camo.githubusercontent.com/f4757564f093dd7c91d319062d8310603a8da480c3775e6fb9f6a0a51b3ead8c/68747470733a2f2f696d672e736869656c64732e696f2f76657273696f6e6579652f642f7068702f72696e7665783a636163686561626c652e7376673f6c6162656c3d446570656e64656e63696573267374796c653d666c61742d737175617265)](https://www.versioneye.com/php/rinvex:cacheable/)[![Scrutinizer Code Quality](https://camo.githubusercontent.com/050ac8e298e580c0f9526199feb97d9f91408d820ea60bd0e592a210d1c35169/68747470733a2f2f696d672e736869656c64732e696f2f7363727574696e697a65722f672f72696e7665782f636163686561626c652e7376673f6c6162656c3d5363727574696e697a6572267374796c653d666c61742d737175617265)](https://scrutinizer-ci.com/g/rinvex/cacheable/)[![Code Climate](https://camo.githubusercontent.com/babe631ddd149c45236bd19a74ff74cb778f5911c6bce9a6c549e70872aab3f4/68747470733a2f2f696d672e736869656c64732e696f2f636f6465636c696d6174652f6769746875622f72696e7665782f636163686561626c652e7376673f6c6162656c3d436f6465436c696d617465267374796c653d666c61742d737175617265)](https://codeclimate.com/github/rinvex/cacheable)[![Travis](https://camo.githubusercontent.com/e4204b33818283522b1c766767a747a658ce1526eb87a442fc0e4055464ed2ba/68747470733a2f2f696d672e736869656c64732e696f2f7472617669732f72696e7665782f636163686561626c652e7376673f6c6162656c3d5472617669734349267374796c653d666c61742d737175617265)](https://travis-ci.org/rinvex/cacheable)[![SensioLabs Insight](https://camo.githubusercontent.com/fa0aa5c36623a4401d649334fd941e2fbdffdc77e97c0ed0882b890dfde3e914/68747470733a2f2f696d672e736869656c64732e696f2f73656e73696f6c6162732f692f38363863316330342d643461642d346463632d613339362d3033636262356131323634652e7376673f6c6162656c3d53656e73696f4c616273267374796c653d666c61742d737175617265)](https://insight.sensiolabs.com/projects/868c1c04-d4ad-4dcc-a396-03cbb5a1264e)[![StyleCI](https://camo.githubusercontent.com/c884687d1bc9eb5342293740ebd924a86728d55f1c7d9ced8de74550f4f58efc/68747470733a2f2f7374796c6563692e696f2f7265706f732f37393332313438362f736869656c64)](https://styleci.io/repos/79321486)[![License](https://camo.githubusercontent.com/08125eb64da769622bff5514893edf97056fc546bc2a5bad434eec39a64e48f3/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f72696e7665782f636163686561626c652e7376673f6c6162656c3d4c6963656e7365267374796c653d666c61742d737175617265)](https://github.com/rinvex/cacheable/blob/develop/LICENSE)

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 rinvex/cacheable
    ```
2. Use the `\Rinvex\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.

Changelog
---------

[](#changelog)

Refer to the [Changelog](CHANGELOG.md) for a full history of the project.

Support
-------

[](#support)

The following support channels are available at your fingertips:

- [Chat on Slack](http://chat.rinvex.com)
- [Help on Email](mailto:help@rinvex.com)
- [Follow on Twitter](https://twitter.com/rinvex)

Contributing &amp; Protocols
----------------------------

[](#contributing--protocols)

Thank you for considering contributing to this project! The contribution guide can be found in [CONTRIBUTING.md](CONTRIBUTING.md).

Bug reports, feature requests, and pull requests are very welcome.

- [Versioning](CONTRIBUTING.md#versioning)
- [Pull Requests](CONTRIBUTING.md#pull-requests)
- [Coding Standards](CONTRIBUTING.md#coding-standards)
- [Feature Requests](CONTRIBUTING.md#feature-requests)
- [Git Flow](CONTRIBUTING.md#git-flow)

Security Vulnerabilities
------------------------

[](#security-vulnerabilities)

If you discover a security vulnerability within this project, please send an e-mail to [help@rinvex.com](help@rinvex.com). All security vulnerabilities will be promptly addressed.

About Rinvex
------------

[](#about-rinvex)

Rinvex is a software solutions startup, specialized in integrated enterprise solutions for SMEs established in Alexandria, Egypt since June 2016. We believe that our drive The Value, The Reach, and The Impact is what differentiates us and unleash the endless possibilities of our philosophy through the power of software. We like to call it Innovation At The Speed Of Life. That’s how we do our share of advancing humanity.

License
-------

[](#license)

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

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

###  Health Score

20

—

LowBetter than 14% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity10

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity36

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/57220bcc6afe4ef362767e35e66fa9bb7682128ee88980aa18e9b3ef71c4a4b4?d=identicon)[zvestaphp](/maintainers/zvestaphp)

---

Top Contributors

[![indradevzapbuild](https://avatars.githubusercontent.com/u/36837016?v=4)](https://github.com/indradevzapbuild "indradevzapbuild (1 commits)")

### Embed Badge

![Health badge](/badges/zvestaphp-cacheable/health.svg)

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

PHPackages © 2026

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