#667·orm

[Question] - how to customize the store at RedisCacheProvider

Author: smarcetCreated Jun 25, 2025Updated Jun 25, 2025

Hello! currently i have set this at confg/doctrine.php

  'cache'                     => [
        'default'                => env('DOCTRINE_CACHE', 'redis'),
        'namespace'              => null,
        'second_level'           => [
            'enabled'                => true,
            'region_lifetime'        => 3600,
            'region_lock_lifetime'   => 60,
            'regions'                => [
            ],
            'log_enabled'  => true,
            'file_lock_region_directory' => '/tmp'
        ],
        'metadata'         => [
            'driver'       => env('DOCTRINE_METADATA_CACHE', env('DOCTRINE_CACHE', 'redis')),
            'namespace'    => 'meta',
            'store'        => env('DOCTRINE_QUERY_CACHE_STORE', 'doctrine_redis'),
            'lifetime'     => 7200, // 1 hour
        ],
        'query'            => [
            'driver'       => env('DOCTRINE_QUERY_CACHE', env('DOCTRINE_CACHE', 'redis')),
            'namespace'    => 'qry',
            'store'        => env('DOCTRINE_QUERY_CACHE_STORE', 'doctrine_redis'),
            'lifetime'     => 3600, // 1 hour
        ],
        'result'           => [
            'driver'       => env('DOCTRINE_RESULT_CACHE', env('DOCTRINE_CACHE', 'redis')),
            'namespace'    => 'res',
            'store'        => env('DOCTRINE_QUERY_CACHE_STORE', 'doctrine_redis'),
            'lifetime'     => 3600, // 1 hour
        ],
    ],

for metadata i set i up a custom store but looking a the code here https://github.com/laravel-doctrine/orm/blob/3a38bf9c4cebd8eb1bad337ce6f4529743d2554f/src/Configuration/Cache/IlluminateCacheProvider.php#L24 its being overrided by https://github.com/laravel-doctrine/orm/blob/3a38bf9c4cebd8eb1bad337ce6f4529743d2554f/src/Configuration/Cache/RedisCacheProvider.php#L9 so my 'store' setting is not honored any way to overload he behavior of RedisCacheProvider ? kind regards Seba