The feature here is a configurable option to set a cache item in Drupal's cache table when a user (or anon/IP address) has voted on a particular piece of content. The advantage to checking for this cache item over the using VotingAPI's functions/tables is that many high performance sites store Drupal's cache table in a faster store, such a Memcached. So, for these systems, this cache item could improve performance by replacing checks in the DB with those in the faster cache.

There are also a few trivial cleanups in this patch that are unrelated to the main functionality.

CommentFileSizeAuthor
#1 dec-cache.patch6.97 KBezra-g
decisions-alt-cache.patch4.8 KBezra-g

Comments

ezra-g’s picture

Status: Active » Needs review
StatusFileSize
new6.97 KB

Here's a more elegant way of doing this: Check for this cache item by default, and under the default configuration, check the VotingAPI for a vote as a fallback. That way, high performance sites can disable the fallback. Also, this patch implements a dedicated cache for these items, so that this cache can be selectively preserved.

I plan to commit this shortly.

ezra-g’s picture

Status: Needs review » Fixed

This is now committed. Remember to run update.php ;).

anarcat’s picture

Have you looked at #48394: cache voting results? I am not sure those two are related, but we have long required IVR results to be cached since sometimes winners need to be chosen at random in some very specific cases, and results therefore *need* to be cached to be exact... At least that's the way it was settled in advpoll, and I feel we are lacking here..

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.