8000 [FrameworkBundle] Configure caches via DSN · Issue #61958 · symfony/symfony · GitHub
[go: up one dir, main page]

Skip to content

[FrameworkBundle] Configure caches via DSN #61958

@alexander-schranz

Description

@alexander-schranz

Description

Currently if a Symfony Application is deployed and the Application wants to use Redis or something else for caches a Developer is required to change the Application config, so a Redis can be configured.

Required Adjustments:

framework:
    cache:
-       #app: cache.adapter.redis
-       #default_redis_provider: redis://localhost
+       app: cache.adapter.redis
+       default_redis_provider: redis://localhost

Example

It would be nice if we would handle the caches similar how we handle DATABASE_URL and DEFAULT_URI.

APP_CACHE_DSN=redis://localhost
framework:
    cache:
+       app: '%env(APP_CACHE_DSN)%'

Alternative with maybe deprecated the old way with the default_provider_...:

framework:
    cache:
+       app_uri: '%env(APP_CACHE_DSN)%'

This would I think make things easier for company which have own Operation Teams. Or for platforms like Symfony Cloud, Platform.sh, Upsun — which could automatically define the APP_CACHE_DSN in a multi node setup to a Redis or something like that.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0