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.