This issue is for the purpose of a more complete solution to #276615: If users goes to admin/build/themes and does not submit, anon users see cached pages with references to non-existent CSS. We should pursue a file flush mechanism that other modules can call and hook into. drupal_clear_file_caches() would be the standard way of flushing the files/js & files/css directories. Operate very similar to http://api.drupal.org/api/function/hook_flush_caches/7. Hook would be called via *_flush_file_caches(). Standard db page cache should be flushed when this is called as well since it will reference non existent css/js files.
| Comment | File | Size | Author |
|---|---|---|---|
| #8 | 484524.8-flush_cache_hooks.patch | 7.24 KB | deviantintegral |
| #6 | 484524.6-flush_cache_hooks.patch | 7.88 KB | deviantintegral |
| #4 | 484524.4-flush_cache_hooks.patch | 7.97 KB | deviantintegral |
Comments
Comment #1
EvanDonovan commentedSubscribing. Critical feature for Boost compatibility...
Comment #2
sun.core commentedComment #3
deviantintegral commentedI'm running into this problem where I want "clearing the cache" to include tables which aren't cache bins but are in fact "caches" for data stored in memcache. I'd also like to be able to clear objects cached to files (WSDL from web services) when the general cache is wiped, which can't currently be done.
Proposal:
Comment #4
deviantintegral commentedHere's a patch that:
This still needs tests for the new hooks.
Comment #6
deviantintegral commentedRemoved the pass-by-reference since I don't have a real use case for it yet and module_invoke_all() doesn't support it.
Comment #7
marvil07 commentedPatch does not apply anymore, I tried a simple rebase from the time it was done, but some of the lines were touched from June to now, so just changing the status.
I like the idea of those three hook names: less implicit stuff makes us clearer for new developers reading the code.
Comment #8
deviantintegral commentedHere's a rerolled patch, along with a bit of refactoring and hook renaming to match current conventions in cache hook names. Even if this passes, this still needs work to refactor drupal_clear_css_cache(), drupal_clear_js_cache(), and _drupal_flush_css_js() to use the new file flush hook.
Comment #23
smustgrave commentedWonder if this is still a valid feature request after 11 years?
Comment #25
quietone commentedSince there was no response to the query about two years ago, I am closing this issue.
If there is interest in this re-open the issue and add a comment. Or open a new issue and reference this one.