Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Under the flush caches item in the admin menu, there is an item "Page and else", which isn't meaningful.
Comment | File | Size | Author |
---|---|---|---|
#20 | find_a_better_link-1580008-20.patch | 457 bytes | xenophyle |
| |||
#18 | find_a_better_link-1580008-18.patch | 426 bytes | xenophyle |
#16 | find_a_better_link-1580008-16.patch | 463 bytes | Valentine94 |
#15 | page_and_else.patch | 563 bytes | ahoeben |
#12 | 1580008_admin_menu_content_cache.patch | 527 bytes | christefano |
Comments
Comment #1
sunBetter suggestions welcome.
Note that the link's title is used as a sentence fragment in the confirmation message after the cache flush operation has been performed.
Thus, the resulting confirmation message is:
In other words:
!link-title cache cleared.
This was done to keep the API of hook_admin_menu_cache_info() simple. See admin_menu.api.php for details.
Comment #2
xenophyle CreditAttribution: xenophyle commentedYes, so once the label is changed, it will fix the confirmation message too.
I would make a suggestion, but I'm not sure what gets cleared with this menu link. There used to be a clear-cache link called "Page requisites", but I think that was what is now called CSS & JavaScript.
By the way, I love this module and couldn't get anything done without it. It's the first module I install on every site I work on.
Comment #3
sunYup, that's sorta the challenge here.
The "Page and else" literally means the page cache and "any other cache tables of core or contributed modules".
The only stuff that is omitted are the other precisely identifiable caches, for which separate cache flushing links exist.
Comment #4
xenophyle CreditAttribution: xenophyle commentedYeah, I guess it's hard to come up with a snappy name for such a miscellaneous collection, especially when it needs to work in !link-title cache cleared.
At least it should be changed to "Page and other", since "else" doesn't make sense.
Comment #5
sunIs the resulting message proper grammar then?
"Page and other cache cleared."
Somehow sounds wrong to me, but perhaps I'm mistaken.
Comment #6
xenophyle CreditAttribution: xenophyle commentedIdeally it should be "Page and other caches cleared" since there's more than one cache (no matter what the label is).
Comment #7
ahoeben CreditAttribution: ahoeben commentedHow about simply "Content" (resulting in "Content cache cleared")?
That is the terminology that is used in the rest of Drupal.
Comment #8
xenophyle CreditAttribution: xenophyle commentedIf "content cache" is the same data as what is now called "page and else", that works for me :)
Comment #9
dynamicdan CreditAttribution: dynamicdan commented1 month later? No change? +1 for 'Content cache'.
Comment #10
christefano CreditAttribution: christefano commented+1 for the "content cache" wording.
Comment #11
ahoeben CreditAttribution: ahoeben commentedDoes it help if I create a patch?
Comment #12
christefano CreditAttribution: christefano commentedahoeben, here's one for "Content cache", adapted from your patch. Marking needs review.
Comment #14
ahoeben CreditAttribution: ahoeben commented@christefano, the " cache" gets added automatically to the "Content cache cleared." message , so your version would lead to "Content cache cache cleared."
Comment #15
ahoeben CreditAttribution: ahoeben commentedComment #16
Valentine94Re-roll. Please review.
Comment #17
xenophyle CreditAttribution: xenophyle commentedLooks good, but change 'Content cache' to 'Content' as per comment #14.
Comment #18
xenophyle CreditAttribution: xenophyle commentedOr I can try submitting a patch...
Comment #20
xenophyle CreditAttribution: xenophyle commentedTrying again.
Comment #21
calebtr CreditAttribution: calebtr commented#20 applies and works as advertised. After clearing caches, naturally. No one has objected to changing this to 'Content' in three years, so, RTBC.
Comment #22
Valentine94Looks good to me. +1
Comment #24
Dhruv Panchal CreditAttribution: Dhruv Panchal commentedHello,
Please use this drupal function to exclude cache : drupal_page_is_cacheable(FALSE);
Thanks,
Dhruv Panchal
Comment #25
truls1502I think it is better to leave it open a while to let see what Drupal community prefer regarding the spelling.
Comment #26
calebtr CreditAttribution: calebtr commentedGood idea. Six years is clearly not long enough for this community to agree on anything, least of all improvements to user experience.
It has only been about 3 and half years since the last suggestion, so we should give the community some more time to chime in. We've probably got a few months to two years before Drupal 7 officially reaches end-of-life, and if no speaks up before then, well, it is Drupal tradition to strive for perfection, lest we should come up with solutions that are merely good.
If maintainers don't care, just close the issue and mark it won't fix.
Comment #27
truls1502I know and I am agreed with you.
However, I have recently involved in the project which I feel wrong to take the last word about it, I need more feedback. Therefore, I will leave it open for some weeks to see what the current active Drupal users prefer. I will make sure and try to not let the issues be open for years.
Comment #28
calebtr CreditAttribution: calebtr commentedThanks for taking it on, and good luck!
Comment #29
joelpittetThe current one is more correct IMO, I'm -1 for the current patch.
It's emulating core's
drupal_flush_all_caches()
which does page, bootstrap, filter, cache and anything that implementsHOOK_flush_caches()
Comment #30
Anonymous (not verified) CreditAttribution: Anonymous as a volunteer commentedIt's not exactly emulating drupal_flush_all_caches(). Perhaps it should be titled to reflect that it only flushes cache bins. drupal_flush_all_caches() (which is also called if you click the "Flush all caches" menu item) does the following:
While the so-called "Page and else" link only executes:
So it's function is to allow a limited cache clear that doesn't go through the rest of the normal cache clearing/rebuilding process by limiting the clear to known cache bins and not invoking the full rebuild process.