PHP code example of kylin987 / webman-thinkorm-redis-cache
1. Go to this page and download the library: Download kylin987/webman-thinkorm-redis-cache library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
kylin987 / webman-thinkorm-redis-cache example snippets
//获取数据
$id = 10;
$user = User::getRedisCache($id);
//更新数据
//正常使用模型更新数据即可,也可以手动清理缓存触发后续的更新缓存
$id = 10;
$user = User::getRedisCache($id);
User::delCache($user);