And the O(N) is against your entire keyset, and not just the keys you're erasing. Which makes it even worse.
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.
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.
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!
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...