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 |
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.
| Attachment | Size |
|---|---|
| sitemenu.module.cache_.patch | 1.24 KB |

#1
#2
Committed a modified version (cache_clear_all used) to 5.x and HEAD.
Thank you.
#3
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.
#4
Committed to 5.x and HEAD.
Thanks again.
#5