Closed (fixed)
Project:
Block Cache Alter
Version:
6.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
2 Dec 2009 at 18:37 UTC
Updated:
21 Apr 2011 at 16:52 UTC
I have a number of views blocks that display items in a nodequeue. Unfortunately, when a queue is edited, it does not update the nodes, therefore the block cache does not expire. We are able to use time based caching to solve this, but since the nodequeues rarely change, it would be more ideal to dump the cache based on when the nodequeue is edited.
Comments
Comment #1
swentel commentedNodequeue exposes enough hooks to implement this request (nodequeue_add and nodequeue_remove). I'll post a patch somewhere next week to support this.
Comment #2
swentel commentedCommitted this to the dev branch, should work properly. Let me know after some testing and I'll push a new release pretty soon after that.
Comment #4
csavio commentedThis is a great change. I also really like the hook that was added in dev.
I've been testing the dev version locally with nodequeue. I'm having a bit of a problem, with a nodequeue though. An anonymous user block is set to cache globally and clear both block and page cache with nodequeue additions and removals, but the page is not updating for the anonymous user. The authenticated user block updates with nodequeue changes correctly.
The standard node block cache clearing works perfectly for authenticated and anonymous users and appears to use the same logic as the nodequeue changes, so I'm not sure where the issue is. I walked through the code in a debugger and updating the anonymous nodequeue is definitely triggering the _blockcache_alter_nodequeue_cleanup and the cache_clear_all with the correct $sqid.
The view and view output is not cached and the block is only cached through the block page. Can you think of a reason nodequeue view block changes would be reflected for authenticated users, but not anonymous?