PHPackages                             litermi/cache-query-builder - 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. litermi/cache-query-builder

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

litermi/cache-query-builder
===========================

it is a package provider cache from query generate and purge cache when used methods specifics

1.0.60(11mo ago)03.6k1MITPHPPHP ^7.4|^8.0

Since Mar 7Pushed 11mo agoCompare

[ Source](https://github.com/litermi/cache-query-builder)[ Packagist](https://packagist.org/packages/litermi/cache-query-builder)[ RSS](/packages/litermi-cache-query-builder/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependencies (10)Versions (62)Used By (1)

Cache Query Builder for Laravel
===============================

[](#cache-query-builder-for-laravel)

[![Software License](https://camo.githubusercontent.com/55c0218c8f8009f06ad4ddae837ddd05301481fcf0dff8e0ed9dadda8780713e/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d627269676874677265656e2e7376673f7374796c653d666c61742d737175617265)](LICENSE.md)

About
-----

[](#about)

The `cache-query-builder` package allows you to increase the performance and low pressure to database request.

##### [Tutorial how create composer package](https://cirelramos.blogspot.com/2022/04/how-create-composer-package.html)

[](#tutorial-how-create-composer-package)

Features
--------

[](#features)

- cache query getting columns and values
- cache sub query / relationship
- set time individual by model
- methods to get and first values from cache
- methods to save, insert, delete to cache

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

[](#installation)

Require the `litermi/cache-query-builder` package in your `composer.json` and update your dependencies:

```
composer require litermi/cache-query-builder
```

Configuration
-------------

[](#configuration)

set provider

```
'providers' => [
    // ...
    Litermi\Cache\Providers\ServiceProvider::class,
],
```

The defaults are set in `config/cache-query.php`. Publish the config to copy the file to your own config:

```
php artisan vendor:publish --provider="Litermi\Cache\Providers\ServiceProvider"
```

> **Note:** this is necessary to you can change default config

Usage
-----

[](#usage)

To cache for query you need use extend Class

```
class Product extends CacheModel
{
}
```

To cache for query you need use methods: getFromCache or firstCache

```
        return Product::query()
            ->where('active', ModelConst::ENABLED)
            ->with($relations)
            ->getFromCache(['*'], $tags);
```

if you want purge cache can use methods: saveWithCache, insertWithCache, deleteWithCache

```
            $product = new Product();
            $product->saveWithCache();
```

```
            Product::insertWithCache($values);
```

```
            $product->deleteWithCache();
```

License
-------

[](#license)

Released under the MIT License, see [LICENSE](LICENSE).

###  Health Score

41

—

FairBetter than 89% of packages

Maintenance51

Moderate activity, may be stable

Popularity21

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity68

Established project with proven stability

 Bus Factor1

Top contributor holds 98.7% 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 ~20 days

Recently: every ~5 days

Total

60

Last Release

347d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/73536c3820a8a906ec83b9a56ebff32aa6ef4529c66efb6a33b42fde1dfb55f2?d=identicon)[litermi](/maintainers/litermi)

---

Top Contributors

[![cirelramoslitermi](https://avatars.githubusercontent.com/u/142442403?v=4)](https://github.com/cirelramoslitermi "cirelramoslitermi (75 commits)")[![cirelramos](https://avatars.githubusercontent.com/u/11335197?v=4)](https://github.com/cirelramos "cirelramos (1 commits)")

---

Tags

laraveldatabasecachequery

### Embed Badge

![Health badge](/badges/litermi-cache-query-builder/health.svg)

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

###  Alternatives

[tucker-eric/eloquentfilter

An Eloquent way to filter Eloquent Models

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

Laravel Pulse is a real-time application performance monitoring tool and dashboard for your Laravel application.

1.7k12.1M99](/packages/laravel-pulse)[roots/acorn

Framework for Roots WordPress projects built with Laravel components.

9682.1M97](/packages/roots-acorn)[aedart/athenaeum

Athenaeum is a mono repository; a collection of various PHP packages

245.2k](/packages/aedart-athenaeum)[ytake/laravel-couchbase

Couchbase providers for Laravel

3051.9k](/packages/ytake-laravel-couchbase)[ntanduy/cloudflare-d1-database

Easy configuration and setup for D1 Database connections in Laravel.

215.4k](/packages/ntanduy-cloudflare-d1-database)

PHPackages © 2026

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