改进 模型缓存
This commit is contained in:
parent
65835902b8
commit
7341062f37
@ -77,6 +77,12 @@
|
||||
'lock_connection' => 'default',
|
||||
],
|
||||
|
||||
'redis_2' => [
|
||||
'driver' => 'redis',
|
||||
'connection' => 'cache_2',
|
||||
'lock_connection' => 'default',
|
||||
],
|
||||
|
||||
'dynamodb' => [
|
||||
'driver' => 'dynamodb',
|
||||
'key' => env('AWS_ACCESS_KEY_ID'),
|
||||
|
@ -135,6 +135,17 @@
|
||||
'persistent' => true,
|
||||
],
|
||||
|
||||
|
||||
'cache_2' => [
|
||||
'url' => env('REDIS_URL'),
|
||||
'host' => env('REDIS_HOST', '127.0.0.1'),
|
||||
'username' => env('REDIS_USERNAME'),
|
||||
'password' => env('REDIS_PASSWORD'),
|
||||
'port' => env('REDIS_PORT', '6379'),
|
||||
'database' => 2,
|
||||
'persistent' => true,
|
||||
],
|
||||
|
||||
],
|
||||
|
||||
];
|
||||
|
11
config/laravel-model-caching.php
Normal file
11
config/laravel-model-caching.php
Normal file
@ -0,0 +1,11 @@
|
||||
<?php
|
||||
|
||||
return [
|
||||
'cache-prefix' => '',
|
||||
|
||||
'enabled' => env('MODEL_CACHE_ENABLED', true),
|
||||
|
||||
'use-database-keying' => env('MODEL_CACHE_USE_DATABASE_KEYING', true),
|
||||
|
||||
'store' => 'redis_2',
|
||||
];
|
Loading…
Reference in New Issue
Block a user