PHPackages                             ndinhbang/laravel-query-cache - 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. ndinhbang/laravel-query-cache

ActiveLibrary[Caching](/categories/caching)

ndinhbang/laravel-query-cache
=============================

Laravel database query cache

1.0.0(1y ago)06MITPHPPHP ^8.1

Since Jun 7Pushed 1y ago1 watchersCompare

[ Source](https://github.com/ndinhbang/laravel-query-cache)[ Packagist](https://packagist.org/packages/ndinhbang/laravel-query-cache)[ Docs](https://github.com/ndinhbang/laravel-query-cache)[ RSS](/packages/ndinhbang-laravel-query-cache/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependencies (13)Versions (2)Used By (0)

Laravel database query cache
============================

[](#laravel-database-query-cache)

[![Latest Version on Packagist](https://camo.githubusercontent.com/af22d5c4f57805dae724e042511cc089ee6e609224a04402cd806fcb156f0fd8/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6e64696e6862616e672f6c61726176656c2d71756572792d63616368652e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/ndinhbang/laravel-query-cache)[![GitHub Tests Action Status](https://camo.githubusercontent.com/d3f0a5a0b6b0c0ab0735f06bd2cfd328294dc445de724694c0c5c3faaabddac3/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f6e64696e6862616e672f6c61726176656c2d71756572792d63616368652f72756e2d74657374732e796d6c3f6272616e63683d6d61696e266c6162656c3d7465737473267374796c653d666c61742d737175617265)](https://github.com/ndinhbang/laravel-query-cache/actions?query=workflow%3Arun-tests+branch%3Amain)[![GitHub Code Style Action Status](https://camo.githubusercontent.com/30772411e1b93ce2a9c4c86b22c526b9f7124d7a473700a46beb8db797752a8a/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f6e64696e6862616e672f6c61726176656c2d71756572792d63616368652f6669782d7068702d636f64652d7374796c652d6973737565732e796d6c3f6272616e63683d6d61696e266c6162656c3d636f64652532307374796c65267374796c653d666c61742d737175617265)](https://github.com/ndinhbang/laravel-query-cache/actions?query=workflow%3A%22Fix+PHP+code+style+issues%22+branch%3Amain)[![Total Downloads](https://camo.githubusercontent.com/09fd0496a2664732ae0c32634517f4d3b794996b34fabfa95afca5b73881434c/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6e64696e6862616e672f6c61726176656c2d71756572792d63616368652e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/ndinhbang/laravel-query-cache)

This is where your description should go. Limit it to a paragraph or two. Consider adding a small example.

Support us
----------

[](#support-us)

[![](https://camo.githubusercontent.com/6ff4ad25908f455815a27347b746187592d3e64bfd78533cb752b69b0d883603/68747470733a2f2f6769746875622d6164732e73332e65752d63656e7472616c2d312e616d617a6f6e6177732e636f6d2f71756572792d63616368652e6a70673f743d31)](https://spatie.be/github-ad-click/query-cache)

We invest a lot of resources into creating [best in class open source packages](https://spatie.be/open-source). You can support us by [buying one of our paid products](https://spatie.be/open-source/support-us).

We highly appreciate you sending us a postcard from your hometown, mentioning which of our package(s) you are using. You'll find our address on [our contact page](https://spatie.be/about-us). We publish all received postcards on [our virtual postcard wall](https://spatie.be/open-source/postcards).

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

[](#installation)

You can install the package via composer:

```
composer require ndinhbang/laravel-query-cache
```

You can publish the config file with:

```
php artisan vendor:publish --tag="query-cache-config"
```

Usage
-----

[](#usage)

```
$queryCache = new Ndinhbang\QueryCache();
echo $queryCache->echoPhrase('Hello, Ndinhbang!');
```

Testing
-------

[](#testing)

```
composer test
```

Changelog
---------

[](#changelog)

Please see [CHANGELOG](CHANGELOG.md) for more information on what has changed recently.

Contributing
------------

[](#contributing)

Please see [CONTRIBUTING](CONTRIBUTING.md) for details.

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

[](#security-vulnerabilities)

Please review [our security policy](../../security/policy) on how to report security vulnerabilities.

Credits
-------

[](#credits)

- [Nguyen Dinh Bang](https://github.com/ndinhbang)
- [All Contributors](../../contributors)

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

###  Health Score

25

—

LowBetter than 37% of packages

Maintenance32

Infrequent updates — may be unmaintained

Popularity4

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity49

Maturing project, gaining track record

 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.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

704d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/02b45621349fe6f28d5a4213f1ff1e73baaf2eeef6b249defe73ff437003dd6d?d=identicon)[ndinhbang](/maintainers/ndinhbang)

---

Top Contributors

[![bang-abilive](https://avatars.githubusercontent.com/u/267970447?v=4)](https://github.com/bang-abilive "bang-abilive (1 commits)")

---

Tags

laravelQuery Cachendinhbang

###  Code Quality

TestsPest

Code StyleLaravel Pint

### Embed Badge

![Health badge](/badges/ndinhbang-laravel-query-cache/health.svg)

```
[![Health](https://phpackages.com/badges/ndinhbang-laravel-query-cache/health.svg)](https://phpackages.com/packages/ndinhbang-laravel-query-cache)
```

###  Alternatives

[spatie/laravel-responsecache

Speed up a Laravel application by caching the entire response

2.8k8.2M51](/packages/spatie-laravel-responsecache)[ryangjchandler/blade-cache-directive

Cache chunks of your Blade markup with ease.

202200.8k2](/packages/ryangjchandler-blade-cache-directive)[vormkracht10/laravel-mails

Laravel Mails can collect everything you might want to track about the mails that has been sent by your Laravel app.

24149.7k](/packages/vormkracht10-laravel-mails)[innoge/laravel-policy-soft-cache

This package helps prevent performance problems with frequent Policy calls within your application lifecycle.

2356.9k](/packages/innoge-laravel-policy-soft-cache)[namoshek/laravel-redis-sentinel

An extension of Laravels Redis driver which supports connecting to a Redis master through Redis Sentinel.

38679.0k](/packages/namoshek-laravel-redis-sentinel)[dragon-code/laravel-cache

An improved interface for working with cache

6844.8k10](/packages/dragon-code-laravel-cache)

PHPackages © 2026

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