Posted by ardee on March 30, 2007 at 3:36am
Jump to:
| Project: | jRating |
| Version: | 5.x-1.x-dev |
| Component: | Miscellaneous |
| Category: | feature request |
| Priority: | critical |
| Assigned: | hickory |
| Status: | postponed (maintainer needs more info) |
Issue Summary
Hi,
I have Drupal cacheing turned on, but with a ZERO minimum time. However, this still seems to mess with voting: if an anonymous user votes, jRating indicates that it registers his vote. But when he refreshes the screen, it "loses" that vote. If, however, a logged-in user looks at the same node, he sees the additional vote.
I wonder if the problem is this: the new vote should tag the node as having changed, so that cached users will get an updated version of the node from Drupal when they display it.
What do you think?
Thanks!
Comments
#1
I think it is a good idea. Because there are usually more pageviews than votes, this would result in better performance and response time for anonymous users and site as a whole.
#2
I'm moving this issue over to the jRating module: because VotingAPI deals with many types of content (not just nodes), and the need to invalidate the cache is very application-specific, I'm not going to blow the cache away in the API itself. It should be easy enough to do in the calling module itself (like jRating or fivestar).
#3
Upon further review, I wonder if it's really the node that needs to be marked as updated ... or the PAGE on which the node is being displayed. I.e., is this problem related to page caching or to node caching (or to some other form of caching)?
In the interim, I've disabled the ability of anonymous users to vote on content, somewhat reluctantly (as now we're getting very few votes).
#4
As far as I know, there's not much granularity to caching, so it would have to be cache_clear_all or nothing. Probably best to stick with nothing for now, especially as anonymous voting is a bit of a hack anyway.
#5
Does anyone know how to invalidate the cache for a particular node?
#6