You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

40 lines
1.2 KiB

1 year ago
  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. 'host' => '127.0.0.1',
  28. 'port' => 6379,
  29. 'password' => '',
  30. 'select' => 0,
  31. // 缓存有效期 0表示永久缓存
  32. 'expire' => 3600,
  33. 'prefix' => '',
  34. ],
  35. // 更多的缓存连接
  36. ],
  37. ];