« Previous | Next » 

Revision 04249726

ID0424972658ee1de9c14086b0250311a78ccf7f62
Parent 4648194a
Child a6bbd13d, 31ff47aa

Added by Robert Lemke over 6 years ago

[!!!][FEATURE] Persistent Caches

This change introduces the concept of persistent caches. Caches which are
configured to be "persistent" will be skipped by the Cache Manager when
flushing all caches or flushing caches by tag. Therefore it is now
possible to use the caching framework as a low level key-value-store
for storing keys, preferences, tokens or other artifacts which usually
would have been stored in the Data/Persistent directory.

If persistent caches are used consequently, it is possible to configure
a Flow application to not store any persistent data in the file system.
This allows for clustering and more flexible management in cloud
environments.

A cache is marked as "persistent" by setting the respective flag in the
configuration in Caches.yaml::

Acme_MyCache:
frontend: TYPO3\Flow\Cache\Frontend\StringFrontend
backend: TYPO3\Flow\Cache\Backend\SimpleFileBackend
persistent: true

Persistent caches won't be flushed by the ``flow:cache:flush`` commands,
and for file based caches, the data is not stored in
``Data/Temporary/Cache`` by default, but in ``Data/Persistent/Cache``.

Note: This change might break unit tests which mock cache frontend /
backend combinations because a new lifecycle method (initializeObject)
has been introduced to the AbstractFrontend. In order to fix these
tests, simply make sure to call initializeObject() after the frontend
has been instantiated.

Change-Id: I0e18122d74807a75c6e544c5074c8e924e21c649
Resolves: FLOW-261
Releases: master, 3.0

  • added
  • modified
  • copied
  • renamed
  • deleted