Project

General

Profile

Actions

Bug #99495

closed

Memcache Cache Backend fatal Error when using memcache module

Added by P Stern over 1 year ago. Updated 10 months ago.

Status:
Resolved
Priority:
Should have
Assignee:
-
Category:
Caching
Target version:
Start date:
2023-01-09
Due date:
% Done:

100%

Estimated time:
TYPO3 Version:
11
PHP Version:
8.0
Tags:
cache
Complexity:
easy
Is Regression:
Sprint Focus:
On Location Sprint

Description

Note: There are 2 PHP-Modules for accessing memcache - [memcache](https://www.php.net/manual/en/book.memcache.php) and memcache*d*.

The documentation at https://docs.typo3.org/m/typo3/reference-coreapi/11.5/en-us/ApiOverview/CachingFramework/FrontendsBackends/Index.html#memcached-backend

says:

There are two PHP memcached implementations: "memcache" and "memcached". Currently, only memcache is supported by this backend.

When attempting to use the MemcachedBackend with the PHP memcache module (not memecached), everything (frontend, backend, console-command) dies with:

Uncaught TYPO3 Exception Class "Memcached" not found

This is because of the code on line #132 of typo3/sysext/core/Classes/Cache/Backend/MemcachedBackend.php :

$compressionFlag = $this->usedPeclModule === 'memcache' ? MEMCACHE_COMPRESSED : \Memcached::OPT_COMPRESSION;

which cannot be interpreted without Memcache*d* class existing (i.e. the memcache*d* module has been loaded).

1) MemcachedBackend only works with the Memcache*d* installed even though it appears to want to work with either Memcache or Memcache*d*

2) The documentation is not just out of date, but leads to installing the less advantages memcache module.

Actions

Also available in: Atom PDF