config.php 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. <?php
  2. // +----------------------------------------------------------------------
  3. // | ThinkPHP [ WE CAN DO IT JUST THINK ]
  4. // +----------------------------------------------------------------------
  5. // | Copyright (c) 2006~2016 http://thinkphp.cn All rights reserved.
  6. // +----------------------------------------------------------------------
  7. // | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
  8. // +----------------------------------------------------------------------
  9. // | Author: liu21st <liu21st@gmail.com>
  10. // +----------------------------------------------------------------------
  11. return [
  12. 'session' => [
  13. // SESSION 前缀
  14. 'prefix' => 'ebapi',
  15. // 驱动方式 支持redis memcache memcached
  16. 'type' => '',
  17. // 是否自动开启 SESSION
  18. 'auto_start' => true,
  19. ],
  20. 'exception_handle' => \app\ebapi\controller\ApiException::class,
  21. // +----------------------------------------------------------------------
  22. // | 缓存设置
  23. // +----------------------------------------------------------------------
  24. 'cache' => [
  25. // 驱动方式
  26. 'type' => 'File',
  27. // 缓存保存目录
  28. 'path' => CACHE_PATH,
  29. // 缓存前缀
  30. 'prefix' => 'ebapi',
  31. // 缓存有效期 0表示永久缓存
  32. 'expire' => 1400,
  33. ],
  34. ];