MemcachedBackend is a Transient backend
The Memcached cache backend in TYPO3 is a transient backend, meaning it is capable of storing values which are not strings. By implementing TransientBackendInterface it is communicated to VariableFrontend that the backend can receive and return object instances and other non-string values. This in turn improves performance and delegates the serialization to memcached's selected serializer (defined in php.ini settings). This also means that chunk-splitting will not happen when a non-string value is passed to the cache backend.
Since serialization is no longer done automatically, passing an object which when serialized and compressed exceeds the maximum bucket size for memcached. The result is that caching the entry fails, a log message gets recorded, and subsequent get/has returns FALSE for the ID.
It is extremely unlikely that any serialized and compressed objects exceed this limit.
[TASK] Make MemcachedBackend a transient backend
Allows passing non-string values to the backend, which
is perfectly allowed for this type of backend. The change
means that VariableFrontends used with this backend will
store non-string values without serializing, thus optimising
performance and transparency.
- Exceptions are no longer thrown when a non-string is passed
- Chunk-splitting does not happen on non-strings; entries
exceeding the maximum bucket size get logged and ignored.
- Serializer decision is delegated to memcached configuration.
Tested-by: TYPO3com <firstname.lastname@example.org>
Reviewed-by: Claus Due <email@example.com>
Tested-by: Claus Due <firstname.lastname@example.org>
Reviewed-by: Elmar Hinz <email@example.com>
Tested-by: Elmar Hinz <firstname.lastname@example.org>
Reviewed-by: Christian Kuhn <email@example.com>
Tested-by: Christian Kuhn <firstname.lastname@example.org>