Download the PHP package limingxinleo/swoft-entity-cache without Composer
On this page you can find all versions of the php package limingxinleo/swoft-entity-cache. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Please rate this library. Is it a good library?
Informations about the package swoft-entity-cache
swoft-entity-cache
Swoft 模型实体缓存
环境变量
# 实体缓存超时时间
ENTITY_CACHE_TTL=3600
# 模型缓存前缀
ENTITY_PREFIX=prefix
使用
config/properties/app.php中增加对应自定义组件
return [
...
'components' => [
'custom' => [
'Swoftx\\Db\\Entity\\',
],
],
];
修改实体基类,增加ModelCacheable Trait
调用
<?php
// 从Redis中拿模型实体
$user = User::findOneByCache(1);
All versions of swoft-entity-cache with dependencies
PHP Build Version
Package Version
Requires
php Version
>=7.0
swoft/framework Version ^1.0.25
swoft/db Version ^1.0
swoft/redis Version ^1.0.15
swoft/framework Version ^1.0.25
swoft/db Version ^1.0
swoft/redis Version ^1.0.15
The package limingxinleo/swoft-entity-cache contains the following files
Loading the files please wait ....