Open mvenghaus opened 3 years ago
Hi, thanks for opening the issue! This is something I've been thinking about, too. So far I haven't had to cache my custom configuration files, but it certainly is a use case.
My idea was to allow a file called etc/cache-clean-rules.json
(or maybe .edn
or .js
) to be added to modules.
In this file it would be possible to declare three types of mappings:
1.) file name regex to cache types (as in your example) 2.) file name regex to cache IDs 3.) file name regex to a callback that returns the cache IDs to clean for a given file
The underlying idea is to keep cache cleans granular so full config cache cleans can be avoided if possible. Do you have any thoughts on this?
Hi,
that sounds like a plan .. I'm in :)
Hey Vinai,
I have some custom configuration files and I want your tool to handle them without rebuilding the source.
A rules config file would be nice .. maybe something simple like that: vendor/bin/cache-clean.js -w --custom-rules=rules.json
Or is it already possible?
Regards Marcus