-
Notifications
You must be signed in to change notification settings - Fork 0
thinkcache
Joe Huss edited this page Nov 10, 2022
·
1 revision
composer require psr/container ^1.1.1 webman/think-cache
webman/think-cache This is actually an automated installation of the
toptink/think-cacheplugin。
Configuration file for config/thinkcache.php
<?php
namespace app\controller;
use support\Request;
use think\facade\Cache;
class UserController
{
public function db(Request $request)
{
$key = 'test_key';
Cache::set($key, rand());
return response(Cache::get($key));
}
}