Closed (fixed)
Project:
Nodereference Count
Version:
6.x-1.x-dev
Component:
Miscellaneous
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
7 Sep 2011 at 11:08 UTC
Updated:
22 Nov 2011 at 21:11 UTC
Hello,
I added the field to a View, and all show as 0 count.Yet on the node page the correct count appears. I am using Views 6.3 dev.
Any tips?
Comments
Comment #1
giorgio79 commentedAh I just had to clear cache...
Comment #2
derMatze commentedSame problem here, clearing the cache sets the counts to new/correct values... But that should be done without clearing the cache every time something is inserted... right?
Comment #3
gilgabar commentedNo, I'm afraid that's just how caching works. Whether it is data from node reference count or some other field, if your cache expires once an hour then whatever your cached values are will be displayed for that hour, even if you change those values, unless the cache is rebuilt manually. I am assuming you are using time based cache invalidation. You may want to check out http://drupal.org/project/views_content_cache. I haven't used it, but it is supposed to invalidate the cache whenever content changes, which sounds like what you are after. That will only help with the Views cache though. If you have other layers of caching, the page cache for anonymous users, block cache, or a reverse proxy like Varnish, for instance, then you will need to adjust your caching strategies to account for that. Increasing the frequency of cache rebuilds may also be appropriate (every 5 minutes instead of every hour, maybe), depending on your needs.