Like/Dislike/Stash/Ignore count #42

Closed
krainboltgreene opened this Issue Jul 22, 2012 · 3 comments

Comments

Projects
None yet
2 participants

So I found myself needing a count of the above types. I realized I could do some_movie.liked_by.size, but that the data returned (an integer) might be one of those "eventually consistant" things. Since we're already using Redis and a queue system perhaps store the counts in memory that get updated at-some-point?

I could do a pull request after I look through the code.

Owner

davidcelis commented Jul 23, 2012

Someone else requested a cache of this as well, so I thought about generating a migration to add cache columns to recommendable models. Ultimately I didn't like that, but caching them in Redis is a pretty obvious choice. Since I see this getting requested, it should be easy to do, so I'll take a look.

Owner

davidcelis commented Jul 23, 2012

Only thing is, it seems like it would be largely unused for the numbers of stashes and ignores. Any reason to cache the counts for those items along with likes and dislikes?

@davidcelis davidcelis pushed a commit that referenced this issue Jul 23, 2012

David Celis Add Redis caches for like/dislike counts. Progress on #42.
Signed-off-by: David Celis <david@davidcelis.com>
30efcab

Mostly for me when it comes to Refis and numbers, it's "well why not?"

Kurtis Rainbolt-Greene
Difference Engineers
643 Magazine St STE #102,
New Orleans, LA 70130
202-643-2263

On Monday, July 23, 2012 at 3:12 PM, David Celis wrote:

Only thing is, it seems like it would be largely unused for the numbers of stashes and ignores. Any reason to cache the counts for those items along with likes and dislikes?


Reply to this email directly or view it on GitHub:
#42 (comment)

davidcelis closed this in 9518a4b Oct 9, 2012

@davidcelis davidcelis pushed a commit that referenced this issue Oct 9, 2012

David Celis Recommendable 2.0 - please read the CHANGELOG
Recommendable has been rewritten from the ground up. Major changes:

 * No longer require Rails (still require ActiveSupport) (fixes #36)
 * Add support for Mongoid, MongoMapper, and DataMapper (fixes #5)
 * Rename the concept of "Ignoring" items to "Hiding" items
 * Rename the concept of "Stashing" items to "Bookmarking" items
 * Store Likes/Dislikes/Hidden Items/Bookmarks in Redis as opposed to
   using Models
 * Add a Configuration class
 * Likes/Dislikes/Hidden Items/Bookmarks can now all have counters
   (fixes #42)
 * Enable support for Ruby 1.8.7 (fixes #32)
 * Greatly improve speed and performance

Signed-off-by: David Celis <david@davidcelis.com>
7c0d92f
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment