Closed (fixed)
Project:
Insert View
Version:
5.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Task
Assigned:
Reporter:
Created:
1 Oct 2007 at 18:45 UTC
Updated:
26 May 2008 at 15:53 UTC
Jump to comment: Most recent file
This may be debatable, but I feel nodes and blocks that embed views should not be cached. This code should prevent the caching when insert view is added to an input format.
| Comment | File | Size | Author |
|---|---|---|---|
| #1 | insert-view-no-cache.patch | 306 bytes | jpetso |
| insert_view_no_cache.diff | 413 bytes | Dave Cohen |
Comments
Comment #1
jpetso commented+1 on the wish, I consider this important as well. The patch works fine, but has been rolled against the profiles/custom/modules/insert_view/ directory and thus doesn't apply cleanly with "patch -p0 < insert_view_no_cache.diff".
The attached patch fixes this, and also indents the "return TRUE;" similar to the other "return" statements, although 3 spaces is one too much when looking at the official Drupal coding style. (Consistency is better than strict adherance to the guidelines, though.)
Considering that I didn't alter the patch except for non-functional formalities, I take the freedom to change the issue status to "reviewed & tested by the community".
Comment #2
mlsamuelson commentedAfter considering the cache issue, I've decided to apply the patch. It just makes sense. The gain in up-to-date views more than makes up for the performance loss.
Thanks for the patches, and for the review.
I've applied the fix both to the 5 development branch and also to HEAD.
(Additionally, under a separate commit, I fixed the non-standard indentation problem. Thanks for catching that.)
mlsamuelson
Comment #3
john bickar commentedHmm, I'm using the dev release from 03.11.2008 and I have noticed just recently (i.e., within the last week or so) that my inserted views are now being cached.
However, I can verify that my insert_view.module contains the code:
I'm not sure if this is related to this issue or not? The View from which the insert view is pulling updates instantly; the node containing the [view:viewname] tag is not updating until I clear the cache.
Comment #4
mlsamuelson commentedI'm pretty sure what you're experiencing is that the filter cache hasn't updated to reflect the changes in the module. So try this, visit /admin/settings/filters and for the input formats being used, submit the forms again. I believe that ought to jog the filter cache's memory.
I'd tried to hint at this in the second paragraph below, but looking back, it seems I didn't word it clearly. Let me know if what I've suggested works and I'll tweak the upgrade wording in README.txt:
Comment #5
john bickar commentedYou mean I'm supposed to read the thing that says "READ ME" in capital letters?
Yes, resubmitting the input format forms did the trick. You may want to add a line about resubmitting the form if necessary. That won't solve the problem of some people (not mentioning any names) never reading the thing, but it can't hurt.
Thanks!
Comment #6
mlsamuelson commentedUpdate README.txt in light of comment #s 3-5...
Marking as active, task, and assigning to me. I'd like to make the README.txt as straightforward as possible.
(Kicking myself for not doing this before the 5.x-1.0 release.)
(See also #148400: How to use Views Pager with Insert View, for README.txt updates.)
mlsamuelson
Comment #7
ashtonium commentedJust to make a note about clarity. I already had the view filter enabled so I didn't think I needed to do anything. (And the view_filter tags were still technically working, they just weren't being themed properly after being cached.) I re-submitted the /admin/settings/filters/# page where I had previously enabled the "insert view filter" and it's working properly now.
Might just want to mention in the upgrade instructions that everyone should go and re-submit their filter settings pages and enable the view filter for the relevant input filters. (unless there's some way to re-set the filter cache in an insert_view_update_#() call?)
As a side note, you may want to make a note about how the filter effects node caching. I don't remember seeing that anywhere and I think some people will want to know that.
Comment #8
mlsamuelson commented@ashtonium - All excellent ideas!
I'd intended to include better instructions on upgrading to this release, but somehow that slipped my mind. Your idea about clearing the cache is a better idea, anyway. As a result, I've committed changes to both HEAD and the 5.x-1.x-dev branches to:
1. clear the cache on update so folks shouldn't have to re-submit their filter settings.
2. provide a note in the README.txt to note how the filter effects node caching and potentially performance.
Thanks!
mlsamuelson
Comment #9
Anonymous (not verified) commentedAutomatically closed -- issue fixed for two weeks with no activity.