So I have following setting enabled:

* Node expiration on update/delete for node pages and front page
* Menu link/insert/update for 5-depth links

Even if I change a node (but do not update anything in the menu tab), my site has 600+ items added to the queue - it should not happen because menu link was not in fact updated.

CommentFileSizeAuthor
#3 expire-menu_link-2373341.patch2.37 KBpbosmans
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

dealancer’s picture

Title: Node change triggers to clear all children elements of the menu item this links belongs toi » Node change triggers to purge all children elements of the menu item this links belongs to
Spleshka’s picture

Nice point, this issue shouldn't happen in a real life. This is definately the issue where we need to pay some attention :)

pbosmans’s picture

We had tesame problem and in combination with the auth_cache module, the number of expired pages can grow fast. And that was an performance issue for our editors when they changed an item.

So i've created a patch that :
- Will act tesame if the page is at top level of the menu, because the top level of the menu is display on all our pages.
- If it's a child of one op the top-level pages, then only the children, the siblings and the parent of the updated page will be expired.

pbosmans’s picture

Status: Active » Needs review
brockfanning’s picture

Would it be possible for anyone to clarify what exactly is happening? I believe this is happening to us, but I'm not sure. In particular, what does "this links" in this issue title refer to?

brockfanning’s picture

I haven't been able to recreate the problem of a node edit triggering any menu link expirations. I have noticed that the menu admin page's drag-and-drop feature causes a lot of duplicate expirations. For example if you drag the bottom menu link up to the top and click the save, the entire menu tree of links will be expired once for each menu item - so if there are 20 menu items, the same array of URLs is expired 20 times. I don't know an easy way around that, since I guess hook_menu_link_update is called for each link because of the weight change.

But that's a separate issue from what this thread is about. If there are any particular steps I should take to try and recreate this, I'm happy to give it a try.