Quantcast
Channel: Active questions tagged symfony4 - Stack Overflow
Viewing all articles
Browse latest Browse all 3924

Symfony Cache Component configure persistent connection

$
0
0

I'm trying to figure it out how configure symfony + memcached adapter to use persistent connections.

In memcached documentation I found that it has a constructor argument

Memcached::__construct ([ string $persistent_id ] )

https://www.php.net/manual/en/memcached.construct.php

But by default in Symfony code I see it is set to null.

namespace Symfony\Component\Cache\Traits;

trait MemcachedTrait
{
    private static $defaultClientOptions = [
        'persistent_id' => null,
        'username' => null,
        'password' => null,
        \Memcached::OPT_SERIALIZER => \Memcached::SERIALIZER_PHP,
    ];

I've try to set it trough the default_memcached_provider config like this:

default_memcached_provider: memcached://localhost?tcp_keepalive=true&persistent_id=booking_website

Is it ok? How can I tell if it's working.

I'm monitoring the server with newrelic but I don't see any change time spent in memcached, perhaps because I don't have much traffic.


Viewing all articles
Browse latest Browse all 3924

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>