Download the PHP package khophim8k/laravel-caching-model without Composer
On this page you can find all versions of the php package khophim8k/laravel-caching-model. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Table of contents
Download khophim8k/laravel-caching-model
More information about khophim8k/laravel-caching-model
Files in khophim8k/laravel-caching-model
Download khophim8k/laravel-caching-model
More information about khophim8k/laravel-caching-model
Files in khophim8k/laravel-caching-model
Vendor khophim8k
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 khophim8k/laravel-caching-model contains the following files
Loading the files please wait ....