RSS FEED The same caching context's caching provider can be created twice

Status
Not open for further replies.

XF2 Tech Robot

New member
Reputation: 100%
Downloaded
0 bytes
Uploaded
512 MB
Ratio
-
Seedbonus
0
Upload Count
0 (0)
Joined
Feb 15, 2024
Messages
1,900
Reaction score
0
Points
1
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.
Home Register
Top