News for hackers. Stuff that matters.
Re:The Great Redis Misapprehension by tabbyjabby on Sunday November 27, 2011 @06:59PM (#3283788)
Hmm. The author's recommendation to use Redis' 'KEYS' command to pattern match keys for invalidation is a dangerous one. 'KEYS' runs in O(n) time. If you're using Redis in a serious production environment, you do not want want to be using an O(n) command each time you need to invalidate a group of keys. It's better to group related items in a Redis hash table, and that way they are all stored under one common key.

Honestly, I think this article is a more impoverished version of antirez's post on the same topic [1]. antirez, being one of the principal authors of Redis, is a much more authoritative source, and he actually describes all the patterns that this author described in greater detail.

[1] http://antirez.com/post/take-advantage-of-redis-adding-it-to...

Re:The Great Redis Misapprehension by LeafStorm on Sunday November 27, 2011 @07:45PM (#3283916)
And the O(N) is against your entire keyset, and not just the keys you're erasing. Which makes it even worse.
Re:The Great Redis Misapprehension by dickeytk on Sunday November 27, 2011 @08:08PM (#3283985)
Thanks for linking the antirez article, I actually haven't seen that one before I wrote the article. I put a link to it in the article.

As far as they keys thing, it's obviously been a major point of contention with my article. I know the warning, I just don't think it's actually a problem for cache invalidation.

See below on another comment of someone having similar concerns for my explanation why.

Re:The Great Redis Misapprehension by dickeytk on Sunday November 27, 2011 @11:24PM (#3284519)
tabby, I've also updated the article to mention the fact that KEYS may not be a solid use of the system. I would appreciate any feedback!
Re:The Great Redis Misapprehension by tabbyjabby on Monday November 28, 2011 @04:42AM (#3285262)
Sorry, I didn't mean to come across as a dick. I'm glad that you've taken the feedback of your readers into consideration.

I'm a big fan of Redis, and it's a key component of our stack. Sorted sets are useful for a lot more than just leader boards, though that is a good use case for them. It's a bit late here, so I'm not feeling up to writing a big post, but I'm considering writing my own blog post on my experiences with Redis.

Re:The Great Redis Misapprehension by dickeytk on Tuesday November 29, 2011 @03:48AM (#3289648)
I don't think you were at all. Many people mentioned the same thing you did.

I'm new at blogging, so I'm trying to take in everything and produce the best content I can, so I love the feedback!

I would love to see a follow-up article too by the way!