Replace CacheItem::Delete with mandatory cache tags, to remove the need to coordinate caches between webheads

Created on 7 May 2023, over 1 year ago
Updated 13 July 2023, over 1 year ago

Problem/Motivation

If cached data is deleted on one webhead, it must be prevented that this data is used on any other webhead. The ChainedFast backend ensures this by invalidating all webhead cache data on any write to the consistent backend (see ChainedFastBackend::getMultiple).
This is very inefficient and raises the question, under which conditions is that coordination between webheads needed in the first place.

That question, and an alternative chained cache API was pioneered in the DCache module (see API).

Proposed resolution

* Provide a cache API without CacheItem::Delete, so that cache tags are the only way to invalidate cache items
* Drop the high-cost coordination-beween-webheads logic

Remaining tasks

- Add a POC
- Bikeshed
- Implement an API
- Deprecate the old API
- Profit

User interface changes

None.

API changes

API addition, then deprecation.

Data model changes

Full cache tags coverage is mandatory.

📌 Task
Status

Active

Version

11.0 🔥

Component
Cache 

Last updated about 22 hours ago

Created by

🇩🇪Germany geek-merlin Freiburg, Germany

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024