Download & Extend

cache not being refreshed after a node is added, deleted or updated

Project:SiteMenu
Version:5.x-1.x-dev
Component:Code
Category:bug report
Priority:normal
Assigned:Unassigned
Status:closed (fixed)

Issue Summary

If I create a new node, with the term 'foo' assigned to it, the number of the nodes for the term foo won't increase in the site map until I go to the sitemenu's configuration page or edit a vocabulary. This applies only when the sitemenu's cache is enabled. Apparently, the cache is not being refreshed after a node is added, deleted or updated.

Please refer to the attached patch for the proposed solution.

note:
I'm not sure, whether it is better to use the _sitemenu_clear_cache(...) function or just to use the cache_clear_all(...) to refresh the cache. Depending on the content and the configuration of the site, one of the alternatives may be more efficient than the other. However, I'm afraid that for most people it might be too confusing if I made this a configurable option.

AttachmentSize
sitemenu.module.cache_.patch1.24 KB

Comments

#1

Status:active» needs review

#2

Status:needs review» fixed

Committed a modified version (cache_clear_all used) to 5.x and HEAD.

Thank you.

#3

Status:fixed» reviewed & tested by the community

It seems that the call to the _sitemenu_clear_cache() function left in the sitemenu_nodeapi() hook. This causes an error when the new node is added. I'm attaching the patch.

AttachmentSize
sitemenu.module.undefinedFunctionCall.patch 469 bytes

#4

Status:reviewed & tested by the community» fixed

Committed to 5.x and HEAD.

Thanks again.

#5

Assigned to:mcvecka» Anonymous
Status:fixed» closed (fixed)