Laravel 8 缓存
2021-07-19 10:13 更新
给指定磁盘开启缓存功能,需要在该磁盘的配置项中直接添加 cache 配置项。 cache 配置内容是以数组形式存在的,由缓存驱动名称 store (译者注:文档原始描述文字 disk 与示例代码中的 store 不一致,验证代码后的确应该是 store ,故作此修改。)、 缓存过期时间 expire(单位:秒) ,以及缓存前缀 prefix 组成:
's3' => [
'driver' => 's3',
// Other Disk Options...
'cache' => [
'store' => 'memcached',
'expire' => 600,
'prefix' => 'cache-prefix',
],
],以上内容是否对您有帮助:

免费 AI IDE


更多建议: