Commit 0d2cd6c2 authored by Christian Kuhn's avatar Christian Kuhn
Browse files

[TASK] Deprecate wincache cache backend

The upstream wincache PHP module is unmaintained, a
PHP 7.4 version came late and there is no work for
a PHP 8 compatible version on the horizon.

The ApcuBackend is a suitable alternative that works
on windows platform as ram driven key/value store.

The patch deprecates the wincache based cache
backend implementation.

Resolves: #94665
Releases: master
Change-Id: I6e1eb551c048f73d48c85ed498d1cd4caab266d3
Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/70130

Tested-by: core-ci's avatarcore-ci <typo3@b13.com>
Tested-by: Jochen's avatarJochen <rothjochen@gmail.com>
Tested-by: Benni Mack's avatarBenni Mack <benni@typo3.org>
Tested-by: Christian Kuhn's avatarChristian Kuhn <lolli@schwarzbu.ch>
Reviewed-by: Jochen's avatarJochen <rothjochen@gmail.com>
Reviewed-by: Benni Mack's avatarBenni Mack <benni@typo3.org>
Reviewed-by: Christian Kuhn's avatarChristian Kuhn <lolli@schwarzbu.ch>
parent d780c0b5
......@@ -38,6 +38,8 @@ use TYPO3\CMS\Core\Cache\Frontend\FrontendInterface;
* - MD5 of script path and filename and SAPI name
* This prefix makes sure that keys from the different installations do not
* conflict.
*
* @deprecated since v11, will be removed in v12. A substitution with similar characteristics is the ApcuBackend.
*/
class WincacheBackend extends AbstractBackend implements TaggableBackendInterface
{
......@@ -60,6 +62,7 @@ class WincacheBackend extends AbstractBackend implements TaggableBackendInterfac
if (!extension_loaded('wincache')) {
throw new Exception('The PHP extension "wincache" must be installed and loaded in order to use the wincache backend.', 1343331520);
}
trigger_error(__CLASS__ . ' will be removed in TYPO3 v12, use ApcuBackend as substitution with similar characteristics.', E_USER_DEPRECATED);
parent::__construct($context, $options);
}
......
.. include:: ../../Includes.txt
============================================
Deprecation: #94665 - Wincache cache backend
============================================
See :issue:`94665`
Description
===========
The Caching framework backend implementation :php:`TYPO3\CMS\Core\Cache\Backend\WincacheBackend`
is not maintained since Microsoft dropped its support: A PHP 7.4 compatible version
came long after PHP 7.4 release and there are no PHP 8.0 works in sight. This backend
in general found relatively little use and can be substituted with the well
maintained ApcuBackend key/value store on Windows platforms.
The wincache cache backend has been deprecated and should not be used anymore.
Impact
======
The implementation has been marked as deprecated, usages trigger
a deprecation level log entry.
Affected Installations
======================
Some instances hosted on Windows platform *may* use this cache backend. This can be
verified in the backend "Configuration" module, section "TYPO3_CONF_VARS", searching
for string "WincacheBackend".
Migration
=========
TYPO3 cache backend configuration is usually done in :file:`LocalConfiguration.php`.
Affected instances could switch to :php:`ApcuBackend` if the :php:`apcu` PHP module
is loaded, or alternatively to some other backend like :php:`RedisBackend`,
:php:`MemcachedBackend` or :php:`Typo3DatabaseBackend`, depending on the specific
cache size and usage characteristics.
LocalConfiguration example before:
.. code-block:: php
'SYS' => [
'caching' => [
'cacheConfigurations' => [
'aCache' => [
'backend' => 'TYPO3\\CMS\\Core\\Cache\\Backend\\WincacheBackend',
...
LocalConfiguration example after:
.. code-block:: php
'SYS' => [
'caching' => [
'cacheConfigurations' => [
'aCache' => [
'backend' => 'TYPO3\\CMS\\Core\\Cache\\Backend\\ApcuBackend',
...
In case this cache backend is still used for whatever reason and can't be dropped
easily, the class should be copied to an own extension having an own namespace. The
instance configuration needs to be adapted accordingly.
.. index:: LocalConfiguration, PHP-API, NotScanned, ext:core
......@@ -13,7 +13,7 @@
* The TYPO3 project - inspiring people to share!
*/
namespace TYPO3\CMS\Core\Tests\Unit\Cache\Backend;
namespace TYPO3\CMS\Core\Tests\UnitDeprecated\Cache\Backend;
use TYPO3\CMS\Core\Cache\Backend\WincacheBackend;
use TYPO3\CMS\Core\Cache\Exception;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment