RSS Feed/News The same caching context's caching provider can be created twice

Status
Not open for further replies.

ENXF NET

Administrator
Staff member
Administrator
Moderator
+Lifetime VIP+
S.V.I.P.S Member
S.V.I.P Member
V.I.P Member
Collaborate
Registered
Joined
Nov 13, 2018
Messages
27,321
Points
823

Reputation:

This will cause the main cache section to be created twice:
PHP:

Code:
\XF::app()->cache('', false, true);
\XF::app()->cache('', false, false);

When using redis of memcache, this means multiple TCP sessions will be created (which may be SSL and require username/password authentication)

This is because of the following code:

PHP:

Code:
$key = $context;
if ($doctrineCompatible)
{
    $key .= '_doctrine';
}

$cache = $this->container->create('cache', $key, [
    'doctrineCompatible' =>...

Read more

Continue reading...
 
Status
Not open for further replies.
Top