Closed (fixed)
Project:
Boost
Version:
6.x-1.x-dev
Component:
Caching logic
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
22 Oct 2009 at 14:05 UTC
Updated:
16 Nov 2009 at 11:00 UTC
Jump to comment: Most recent file
Comments
Comment #1
mikeytown2 commentedMenu's are sorta like blocks, they are on every page, so your best bet is to clear the entire cache. What your asking can be done programmatically though... this is how I see it working. Find all nodes in a menu, when a node in that menu is changed or a new item is added to the menu, flush all nodes in the menu.
How do you see this working? Flush where menu is displayed (hard problem to do correctly) or Flush nodes inside menu (not as hard to do).
Comment #2
chadd commentedflushing the entire menu would basically be flushing our entire site, so that wouldn't be any more helpful than the current clear cache.
i would want it to find what parent item the changed node has, and then flush all the pages that are under that parent.
the farther "down the line" the edited node is, the fewer other nodes would be flushed along with it.
and as an added fun bonus, just to make it a little more complex, it would only flush it's 'sibling' pages, if the menu, title or alias was edited.
that would prevent flushing other pages when all that was edited was body content or some other field that had no impact on the menu or url...
Comment #3
mikeytown2 commentedDetecting that only the title, alias or menu has changed is a problem I don't want to solve.
Can you describe this feature request in more detail? Diagrams help.
Comment #4
chadd commentedbased upon the below chart ( i added numbers to keep things straight):
example 1: if you update 'deep 1' then you would have to flush it's siblings, deep 2, deep 3, and it's children, very deep 1, and it's parent, bottom 1
example 2: if you update very deep 2, only deep 4 would be flushed
example 3: if you update bottom 2, flush the following: (parent:) middle 2, (siblings:) bottom 3, bottom 4, (children:) Deep 2, Deep 3, Deep4, Very Deep 2
basically, everytime you edit a page, you'd flush it's parent nodes, children nodes, and sibling nodes. (cool would be the option to choose which of these 3 to flush, for example, i only want to flush sibling and children, or only parents, etc)
having it flush *only* after menu specific changes (title, menu, alias) would be awesome, but i know that would be a huge challenge.
Comment #5
mikeytown2 commentedexample 2 Wouldn't you also flush Very Deep 1?
example 3 Bottom 1?
Help me understand why I need to flush sibling nodes. I get flushing the parent and all child, but why the siblings in another tree like example 1?
Comment #6
chadd commentedno, those aren't siblings to the edited node because they don't have the same parent node, i would call them "cousin's"
i guess it would help if i define siblings: pages at the same level and with the same parent menu item would be "siblings"
pages at the same level but with different menu parent items i'm going to call "cousins"
i think you would have to flush siblings because they share the same "displayed menu"
for example (from above):
if you added a page called "bottom 5" and gave it the parent menu of "middle 2" then that "bottom 5" page menu item should display in the menu on the "bottom 2, 3 & 4"
Comment #7
mikeytown2 commentedok cool, I'll add this to the roadmap. I understand the expected results now.
Comment #8
mikeytown2 commentedDrupal menu system (Drupal 6.x)
Code to load any nodes menu items
This is the start of the rabbit trail for figuring out the parent, siblings and all children of a node in the menu system.
http://api.drupal.org/api/function/menu_secondary_links/6
http://api.drupal.org/api/function/menu_overview_form/6
http://api.drupal.org/api/function/menu_tree_all_data/6 <- Looks like a winner...
Comment #9
mikeytown2 commentedTest case is node/12
Output
With this I need to expire
Self: node/12
Parent: node/10
Siblings: node/21, node/20
Children: node/13, node/14, node/15, node/16, node/17, node/18, node/19
Outputs what I need
Comment #10
mikeytown2 commentedMake this a radio option. Your desired effect or clear all items in the menu if using something like DHTML Menu.
Comment #11
mikeytown2 commentedI got Parent, Sibling, Children done. Well At least I think I did, I need some sleep. I should also Place these into a relationship fieldset or something like that.
Comment #12
mikeytown2 commentedThis is still ugly code, no more global variables though... it works too!
Comment #13
mikeytown2 commentedcommitted