Skip to content

[Cache] allow enabling \Redis::OPT_COMPRESSION and \Redis::OPT_COMPRESSION_LEVEL via connection string #46694

Closed
@dkarlovi

Description

@dkarlovi

Description

Currently, \Symfony\Component\Cache\Traits\RedisTrait::createConnection doesn't seem to provide a way to pass compression options. In my tests, I'm seeing up to 80% reduction in memory usage with just passing

$redis->setOption(\Redis::OPT_COMPRESSION, \Redis::COMPRESSION_ZSTD);

Example

Use

rediss://password@host/?compression=zstd # boolean defaults to something, string enables a specific one

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions