Configure caching in your application's configuration files.
Main Cache Settings
Configure basic cache settings in config/inspirecms.php:
'cache' => [
'languages' => [
'key' => 'inspirecms.languages',
'ttl' => 60 * 60 * 24, // 24 hours in seconds
],
'navigation' => [
'key' => 'inspirecms.navigation',
'ttl' => 60 * 60 * 24,
],
'content_routes' => [
'key' => 'inspirecms.content_routes',
'ttl' => 120 * 60 * 24, // 120 days in seconds
],
'key_value' => [
'ttl' => 60 * 60 * 24,
],
],
Laravel Cache Driver Configuration
InspireCMS uses Laravel's caching system. Configure the cache driver in config/cache.php:
'default' => env('CACHE_DRIVER', 'file'),
'stores' => [
'file' => [
'driver' => 'file',
'path' => storage_path('framework/cache/data'),
],
'redis' => [
'driver' => 'redis',
'connection' => 'cache',
'lock_connection' => 'default',
],
'memcached' => [
'driver' => 'memcached',
'persistent_id' => env('MEMCACHED_PERSISTENT_ID'),
'sasl' => [
env('MEMCACHED_USERNAME'),
env('MEMCACHED_PASSWORD'),
],
'options' => [
// Memcached::OPT_CONNECT_TIMEOUT => 2000,
],
'servers' => [
[
'host' => env('MEMCACHED_HOST', '127.0.0.1'),
'port' => env('MEMCACHED_PORT', 11211),
'weight' => 100,
],
],
],
],