On Sun, Mar 2, 2014 at 4:39 AM, Andreas Kuhne <andreas.ku...@suitopia.com>wrote:
> Ok, > > Redis and Memcache really solve the same problems. > Erm... no, they don't. They are both in-memory stores, but that's where the similarities ends. Memcache is a simple in-memory cache, and that's it. It's designed to provide you an easy way to cache common but expensive operations - be that template rendering, view construction, database retrieval operations, or whatever. If an operation is slow to perform, performed frequently, and changes much less frequently than the frequency with which it is called, you can use memcache to insert the computed value into memory, and retrieve it easily when it is next needed. Values inserted into memcache are set with an expiry time -- so you can say things like "the content of the homepage is cached for 5 minutes". Memcache isn't stored anywhere permanent; if your memcache instance is restarted, you lose everything stored in it. It is, by design a transient data store. Redis is a much more sophisticated data store than memcache. At a superficial level, it can be used in the same way as memcache, but with persistence (so if Redis restarts, you don't lose data). However, this only scratches the surface of Redis' capabilities. Redis has a whole lot of capabilities for handling sets of data, lists of data, bitmaps, publish/subscribe operations, and much more. Check out the Redis docs [1] if you want to get a feel for what you can do. [1] http://redis.io/commands So - don't fall into the trap of thinking Redis is "Memcache, but with persistence". Yes, you could use it like this if you wanted to, but it's not the right tool for that job. Yours, Russ Magee %-) -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscr...@googlegroups.com. To post to this group, send email to django-users@googlegroups.com. Visit this group at http://groups.google.com/group/django-users. To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/CAJxq84_DEOp85g8haUdkyVw11bNZq%3DZxZVB7ODheaEx5GWNAPw%40mail.gmail.com. For more options, visit https://groups.google.com/groups/opt_out.