Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

[FrameworkBundle] Configure caches via DSN #61958

Copy link
Copy link
@alexander-schranz

Description

@alexander-schranz
Issue body actions

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.

kaznovac

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      Morty Proxy This is a proxified and sanitized view of the page, visit original site.