phpvms/config/cache.php

75 lines
1.8 KiB
PHP
Raw Normal View History

2017-06-09 02:28:26 +08:00
<?php
return [
2017-12-18 03:52:42 +08:00
'default' => env('CACHE_DRIVER', 'array'),
2018-08-27 00:40:04 +08:00
'prefix' => env('CACHE_PREFIX', ''),
2017-06-09 02:28:26 +08:00
2017-07-05 04:43:47 +08:00
'keys' => [
'AIRPORT_VACENTRAL_LOOKUP' => [
2018-08-27 00:40:04 +08:00
'key' => 'airports.lookup:',
'time' => 60 * 30,
],
'WEATHER_LOOKUP' => [
2018-08-27 00:40:04 +08:00
'key' => 'airports.weather.', // append icao
'time' => 60 * 60, // Cache for 60 minutes
],
2017-07-05 04:43:47 +08:00
'RANKS_PILOT_LIST' => [
2018-08-27 00:40:04 +08:00
'key' => 'ranks.pilot_list',
'time' => 60 * 10,
],
'USER_API_KEY' => [
2018-08-27 00:40:04 +08:00
'key' => 'user.apikey',
'time' => 60 * 5, // 5 min
],
2017-07-05 04:43:47 +08:00
],
2017-06-09 02:28:26 +08:00
'stores' => [
'apc' => [
'driver' => 'apc',
],
'array' => [
'driver' => 'array',
],
2017-06-09 02:28:26 +08:00
'database' => [
2018-08-27 00:40:04 +08:00
'driver' => 'database',
'table' => 'cache',
2017-06-09 02:28:26 +08:00
'connection' => null,
],
'file' => [
'driver' => 'file',
2018-08-27 00:40:04 +08:00
'path' => storage_path('framework/cache'),
2017-06-09 02:28:26 +08:00
],
'memcached' => [
2018-08-27 00:40:04 +08:00
'driver' => 'memcached',
2017-06-09 02:28:26 +08:00
'persistent_id' => env('MEMCACHED_PERSISTENT_ID'),
2018-08-27 00:40:04 +08:00
'sasl' => [
2017-06-09 02:28:26 +08:00
env('MEMCACHED_USERNAME'),
env('MEMCACHED_PASSWORD'),
],
2018-08-27 00:40:04 +08:00
'options' => [
2017-06-09 02:28:26 +08:00
// Memcached::OPT_CONNECT_TIMEOUT => 2000,
],
'servers' => [
[
2018-08-27 00:40:04 +08:00
'host' => env('MEMCACHED_HOST', '127.0.0.1'),
'port' => env('MEMCACHED_PORT', 11211),
2017-06-09 02:28:26 +08:00
'weight' => 100,
],
],
],
'opcache' => [
'driver' => 'opcache',
],
2017-06-09 02:28:26 +08:00
'redis' => [
2018-08-27 00:40:04 +08:00
'driver' => 'redis',
2017-06-09 02:28:26 +08:00
'connection' => 'default',
],
],
];