Laravel 8 访问多个缓存存储
2021-07-17 17:38 更新
使用 Cache Facade,你可以通过 store 方法来访问各种缓存存储。传入 store 方法的键应该对应 cache 配置信息文件中的 stores 配置数组中所列出的一个:
$value = Cache::store('file')->get('foo');
Cache::store('redis')->put('bar', 'baz', 600); // 10 Minutes以上内容是否对您有帮助:

免费 AI IDE


更多建议: