Download the PHP package vgplay/laravel-redis-model without Composer
On this page you can find all versions of the php package vgplay/laravel-redis-model. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Table of contents
Download vgplay/laravel-redis-model
More information about vgplay/laravel-redis-model
Files in vgplay/laravel-redis-model
Download vgplay/laravel-redis-model
More information about vgplay/laravel-redis-model
Files in vgplay/laravel-redis-model
Vendor vgplay
Package laravel-redis-model
Short Description A simple redis cache library for laravel eloquent model
License MIT
Package laravel-redis-model
Short Description A simple redis cache library for laravel eloquent model
License MIT
Please rate this library. Is it a good library?
Informations about the package laravel-redis-model
laravel-redis-model
- Simple package for caching laravel eloquent model with redis driver
- Support retrieve model stored in redis cache 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-redis-model with dependencies
PHP Build Version
Package Version
The package vgplay/laravel-redis-model contains the following files
Loading the files please wait ....