wwagner / cache-flush-toilet
Cache Flush Toilet - Plays a toilet flush sound whenever a backend user clears the cache. Purely for fun.
Package info
github.com/wwagner-net/cache_flush_toilet
Language:JavaScript
Type:typo3-cms-extension
pkg:composer/wwagner/cache-flush-toilet
Requires
- php: ^8.2
- typo3/cms-backend: ^14.3
- typo3/cms-core: ^14.3
Requires (Dev)
None
Suggests
None
Provides
None
Conflicts
None
Replaces
None
README
A TYPO3 extension that plays a toilet flush whenever a backend user clears the cache. That is all it does. It is a joke, built properly.
What it does
The sound plays the moment you click one of these controls in the backend:
- Toolbar "Clear cache" menu (lightning bolt icon), every entry, including entries added by other extensions
- Page tree context menu, "Clear cache for this page"
- "Clear cache" button in the doc header of the Page and List modules
It works for every backend user who is allowed to use these controls, in every application context. Clearing the cache itself is not touched: the core does its job and shows its usual notification, the extension only adds the sound.
What it deliberately does not do
- No sound in Admin Tools > Maintenance ("Flush TYPO3 and PHP Cache") or the standalone Install Tool
- No sound for cache flushes on the command line, by the scheduler or during deployment
- Nothing in the frontend
- No settings, no off switch. Everyone hears it. Consider your colleagues in an open-plan office before installing.
Requirements
- TYPO3 14.3
- PHP 8.2 or later
Installation
composer require wwagner/cache-flush-toilet
No database changes, no configuration. Clear the caches once after installation (you will hear whether it worked).
To get rid of it again:
composer remove wwagner/cache-flush-toilet
How it works
A small JavaScript module is loaded into the main backend document. It listens for clicks on the cache controls listed above, both in the main document and in the module frame, and plays the sound straight from the click. Because the sound starts from a user interaction, browsers do not block it as autoplay. If a browser refuses to play it anyway, nothing happens apart from the missing sound.
The controls are recognised by the markup the TYPO3 core renders. A future core version that changes this markup may silence the extension until it is updated.
Sound
The flush sound (Resources/Public/Audio/toilet-flush.mp3) was generated
with Magnific (Pikaso AI sound effects) under a paid subscription, which
transfers the rights in the output to the author. It is distributed as part
of this extension under the same licence as the code.
Note: the generator's terms do not allow its output to be used for training other AI models. This is information about the origin of the file, not an additional licence condition.
Licence
GPL-2.0-or-later, see LICENSE. This applies to the code, the icon and the sound.