改进 模型缓存

This commit is contained in:
iVampireSP.com 2022-12-28 21:42:58 +08:00
parent 65835902b8
commit 7341062f37
No known key found for this signature in database
GPG Key ID: 2F7B001CA27A8132
3 changed files with 28 additions and 0 deletions

View File

@ -77,6 +77,12 @@
'lock_connection' => 'default', 'lock_connection' => 'default',
], ],
'redis_2' => [
'driver' => 'redis',
'connection' => 'cache_2',
'lock_connection' => 'default',
],
'dynamodb' => [ 'dynamodb' => [
'driver' => 'dynamodb', 'driver' => 'dynamodb',
'key' => env('AWS_ACCESS_KEY_ID'), 'key' => env('AWS_ACCESS_KEY_ID'),

View File

@ -135,6 +135,17 @@
'persistent' => true, '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,
],
], ],
]; ];

View 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',
];