Download the PHP package devcuongnguyen/laravel-caching-model without Composer
On this page you can find all versions of the php package devcuongnguyen/laravel-caching-model. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Table of contents
Download devcuongnguyen/laravel-caching-model
More information about devcuongnguyen/laravel-caching-model
Files in devcuongnguyen/laravel-caching-model
Download devcuongnguyen/laravel-caching-model
More information about devcuongnguyen/laravel-caching-model
Files in devcuongnguyen/laravel-caching-model
Vendor devcuongnguyen
Package laravel-caching-model
Short Description A simple cache library for laravel eloquent model
License MIT
Package laravel-caching-model
Short Description A simple cache library for laravel eloquent model
License MIT
Please rate this library. Is it a good library?
Informations about the package laravel-caching-model
laravel-caching-model
- Simple package for caching laravel eloquent model
- Support retrieve model stored in cache store by id (or other primary key)
Usage
-
Implement Cacheable interface then use HasCache trait:
- use
fromCache()
static method to retrieve model data from cache storage
Available methods:
-
public static function primaryCacheKey(): string;
- Return primary key for creating cache key
- Default: id
-
public static function getCacheKey($id): string;
- Return cache key for specific instance with primary key is $id
-
public static function cacheTimeout(): int;
- Return cache timeout
- public function scopeCacheWithRelation($query);
- Specific relationship will cache together model
All versions of laravel-caching-model with dependencies
PHP Build Version
Package Version
The package devcuongnguyen/laravel-caching-model contains the following files
Loading the files please wait ....