Hello,
This is a very useful module--THANK YOU! I recently noticed that when using the Boost module for caching, nodes that contain View References do not expire when the view is updated. So the information generated by the view (no views caching enabled) is not updated unless the entire Boost cache is cleared OR the node with the reference is updated.

Since we use the module extensively, I'm working around this by excluding nodes with time-sensitive updates and view references from caching. However, this is not ideal since the heavily trafficked nodes are the ones we most need to cache.

Please let me know if you need more details or a better explanation of the problem. I may be able to provide a small bounty to sponsor a fix.

Thanks in advance,
Joy

Comments

danielb’s picture

Haven't heard of this module, and frankly don't really care to do anything about it. There are almost 160 open bug reports in the Boost issue queue, what's the point....

danielb’s picture

From what I understand, the problem you're having is that when the View is updated, the node which references the View is not automatically updated.

There isn't a nice solution for that at this stage, because there is simply no way to inform Drupal that a relationship exists between the View and the node, and what the nature/direction of that relationship is. The "relation" module attempts to rectify this in Drupal 7, however it still does not apply to views, because views are not handled as entities. I do hope things will be different by Drupal 8.

In any case it shouldn't be View reference's responsibility to do this. A solution may exist, but it would require learning the Boost module, and I'm not prepared to do that.

You could possibly force the relevant nodes to expire with cron, but it wouldn't happen in sync with when it *should* happen, and the displayed node will lag behind the 'real' node somewhat.

danielb’s picture

Have you tried my Peekaboo module?
http://drupal.org/project/peekaboo

If you use this with the 'autoload' option on, it may enable you to workaround this problem. No promises.

Edit: oh no, the Drupal 6 version doesn't do that, so it might not be good enough for you. Why are you developing in D6? GRRRR!

The idea is sound though and you could implement it yourself:
In the node template, don't output the View (contents of the field formatter), simply output a placeholder div (that perhaps has an id which makes up the params for the ajax call you'll need to make).
Create an ajax callback which loads the appropriate view (given the node/field/delta of the referencing node, or alternatively the view:display_n code itself).
Create a jquery script to automatically load the View from the ajax callback in a separate request after the page is done loading.
In this way, the view will never be cached into the node output, and will always be fetched with javascript.

Any competent Drupal developer with jquery/ajax knowledge should be able to set that up for you.

sunshinee’s picture

Status: Active » Closed (fixed)

Danielb,
Thanks for your insight, and I can understand why you don't want to learn the Boost module if it's not something you use. I'm going to try forcing the expiration with cron since some lag time is acceptable in this case. I like the ajax approach, but am shooting for quick-and-easy for the moment. And trust me, I'm moving toward D7 in a hurry, but this particular site is a large one and probably won't be migrated until summer 2013.

I really appreciate your time and am marking this fixed. I'll post back with how the solution works out in case it helps someone else.

Joy