cache.php 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. <?php
  2. // +----------------------------------------------------------------------
  3. // | 缓存设置
  4. // +----------------------------------------------------------------------
  5. return [
  6. // 默认缓存驱动
  7. 'default' => env('cache.driver', 'file'),
  8. // 缓存连接方式配置
  9. 'stores' => [
  10. 'file' => [
  11. // 驱动方式
  12. 'type' => 'File',
  13. // 缓存保存目录
  14. 'path' => '',
  15. // 缓存前缀
  16. 'prefix' => '',
  17. // 缓存有效期 0表示永久缓存
  18. 'expire' => 0,
  19. // 缓存标签前缀
  20. 'tag_prefix' => 'tag:',
  21. // 序列化机制 例如 ['serialize', 'unserialize']
  22. 'serialize' => [],
  23. ],
  24. // 'redis' => [
  25. // // 驱动方式
  26. // 'type' => 'redis',
  27. // // 服务器地址
  28. // 'host' => env('redis.host', '118.195.195.200'),
  29. // "port" => env('redis.port', 6379),
  30. // "password" => env('redis.password', '123456'),
  31. // "timeout" => env('redis.timeout', 1000),
  32. // "select" => env('redis.select', 10),
  33. // ],
  34. // 更多的缓存连接
  35. ],
  36. ];