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