Download the PHP package omarseyam/cacheable without Composer
On this page you can find all versions of the php package omarseyam/cacheable. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Table of contents
Download omarseyam/cacheable
More information about omarseyam/cacheable
Files in omarseyam/cacheable
Download omarseyam/cacheable
More information about omarseyam/cacheable
Files in omarseyam/cacheable
Vendor omarseyam
Package cacheable
Short Description A Laravel trait that transparently caches Eloquent query results (including per-user, searchable and paginated results) with a built-in custom paginator and automatic cache invalidation.
License MIT
Package cacheable
Short Description A Laravel trait that transparently caches Eloquent query results (including per-user, searchable and paginated results) with a built-in custom paginator and automatic cache invalidation.
License MIT
Please rate this library. Is it a good library?
Informations about the package cacheable
Cacheable
A Laravel trait that transparently caches Eloquent query results — including per-user caching, search filtering, and paginated results — with a built-in custom paginator and automatic cache invalidation.
Installation
Install the package via Composer:
No service provider registration is needed — this package only ships a trait and a small helper action class, autoloaded via PSR-4.
Usage
Add the trait to any Eloquent model:
Basic usage
Paginated usage
Full signature
Invalidating the cache
How it works
bring()builds (or reuses) a query, then serves results from Laravel's cache, keyed by table name (or a custom name you provide), optionally scoped per authenticated user (Auth::id()).- When a search term (via
request($search_name)) or a$filtercallback is present, cached results are bypassed and a live, filtered query runs instead. - When
is_paginateistrue, results are paginated with a customLengthAwarePaginatorbuilt byCustomPaginatorAction, and the count itself is cached separately. - Every cache key that gets written is tracked (per user) so
deletingCache()can find and purge all of a model's related cache entries at once.
Requirements
- PHP 8.1+
- Laravel 9, 10, 11, 12, or 13
License
The MIT License (MIT). See LICENSE for more information.
All versions of cacheable with dependencies
PHP Build Version
Package Version
Requires
php Version
^8.1
illuminate/support Version ^9.0|^10.0|^11.0|^12.0|^13.0
illuminate/database Version ^9.0|^10.0|^11.0|^12.0|^13.0
illuminate/pagination Version ^9.0|^10.0|^11.0|^12.0|^13.0
illuminate/support Version ^9.0|^10.0|^11.0|^12.0|^13.0
illuminate/database Version ^9.0|^10.0|^11.0|^12.0|^13.0
illuminate/pagination Version ^9.0|^10.0|^11.0|^12.0|^13.0
The package omarseyam/cacheable contains the following files
Loading the files please wait ...