Story #81432

Replace TYPO3 caching solution with PSR-6 / Doctrine capable alternative

Added by Claus Due over 2 years ago. Updated over 1 year ago.

Status:
New
Priority:
Should have
Assignee:
-
Category:
Caching
Target version:
-
Start date:
2017-06-02
Due date:
% Done:

27%

TYPO3 Version:
9
PHP Version:
Tags:
Sprint Focus:

Description

This issue is a parent issue for tasks related to replacing TYPO3 caches.


Subtasks

Task #81433: Deprecate all current TYPO3 cache backendsNew

Task #81434: Deprecate StringFrontend cache frontendClosed

Feature #81435: Create shared, base cache configuration affectable by TYPO3_CONF_VARSNew

Feature #81436: Introduce concept of "Communicators"New

Task #81437: Migrate core cache configurations to PSR delegateNew

Task #81438: Optional: recreate Typo3DatabaseBackend cache backend as PSR-6 implementationNew

Feature #81455: Add identifier locking capabilities to TYPO3 cache frontendsNew

Task #81458: Consolidate all cache frontends into one frontend which handles any typeNew

Story #81460: Sacrifice caches' ill conceived getIdentifiersByTagClosed

Task #81461: Program cache interaction to interface, not implementationClosed

Task #81500: Switch to filesystem caches as defaultNew


Related issues

Related to TYPO3 Core - Task #88927: The temporary cache file ... could not be written New 2019-08-06

Associated revisions

Revision badca6be (diff)
Added by Claus Due almost 2 years ago

[!!!][TASK] Deprecate cache FrontendInterface->getByTag

See #81460 for a detailed reasoning behind the change.

The patch declares the getByTags method as deprecated
and removes the only usage that existed in TYPO3.

Resolves: #81460
Related: #81432
Releases: master
Change-Id: I9647563246d96228cb906b7d9008b2cec564d3ae
Reviewed-on: https://review.typo3.org/53091
Reviewed-by: Oliver Hader <>
Tested-by: Oliver Hader <>
Reviewed-by: Benni Mack <>
Tested-by: Benni Mack <>
Tested-by: TYPO3com <>

Revision e207ea61 (diff)
Added by Claus Due almost 2 years ago

[TASK] Program to cache frontend interface, not implementations

Instead of annotating and type-hinting specific cache
frontend implementations, TYPO3 should program to
the FrontendInterface instead. This patch corrects that.

Change-Id: Ibc8d31cf78459e700ab9fe3448a53cbe83bccc61
Resolves: #81461
References: #81432
Releases: master
Reviewed-on: https://review.typo3.org/53116
Tested-by: TYPO3com <>
Reviewed-by: Joerg Boesche <>
Tested-by: Joerg Boesche <>
Reviewed-by: Georg Ringer <>
Tested-by: Georg Ringer <>

Revision 6c8a2df3 (diff)
Added by Claus Due over 1 year ago

[TASK] Deprecate StringFrontend cache frontend

Can be drop-in replaced by VariableFrontend. There are no
occurrences in core code except for in tests and comments.
Configurations using this frontend can be automatically
migrated on-the-fly. Such auto-migration is not part of this
patch - this patch only touches the PHPDOC and documents
the deprecation.

Change-Id: I3b4b4979534857fa30b56d9967e8f919fc046ab9
Resolves: #81434
References: #81432
Releases: master
Reviewed-on: https://review.typo3.org/53084
Reviewed-by: Frank Naegler <>
Tested-by: Frank Naegler <>
Reviewed-by: Andreas Fernandez <>
Tested-by: TYPO3com <>
Reviewed-by: Christian Kuhn <>
Tested-by: Christian Kuhn <>

History

#1 Updated by Philipp Gampe over 2 years ago

How about PSR-16 "Simple Cache"? It is much closer to our cache interfaces.

I understand your intention to make use of the doctrine cache implementations by introducing PSR-6, however I would prefer to make this an alternative to the current approach and change our implementation to PSR-16 instead. As far as I can see, doctrine does not make use of PSR-6 either, but uses an interface similar ours and PSR-16. Do you have an example of a successful PSR-6 implementation other than symfony?

http://symfony.com/doc/master/components/cache/psr6_psr16_adapters.html
http://blog.ircmaxell.com/2014/10/an-open-letter-to-php-fig.html
https://www.reddit.com/r/PHP/comments/3vu9dy/psr6_is_about_to_pass_and_still_has_serious/

#2 Updated by Claus Due over 2 years ago

See https://github.com/php-cache comes with adapters for Doctrine and PSR-16 caches. PSR-6 is simply the base.

#3 Updated by Claus Due over 2 years ago

Link no. one above is 404, Philipp.

#4 Updated by Philipp Gampe over 2 years ago

I fixed the link.

The php-cache looks more promising than pure psr-6 interfaces. I still consider psr-6 a good example of "overengineering", but for the sake of interoperability, it might be worth adapting to it.

#5 Updated by Claus Due over 2 years ago

Much, much more details about the vision and strategy for this task:

https://gist.github.com/NamelessCoder/6519f8a0e05dbc4613de16c07bb63a6d

#6 Updated by Susanne Moog almost 2 years ago

  • Category set to Caching

#7 Updated by Christoph Lehmann about 1 month ago

  • Related to Task #88927: The temporary cache file ... could not be written added

Also available in: Atom PDF