-
Notifications
You must be signed in to change notification settings - Fork 1
Home
Welcome to the spring17-django-portal wiki!
Redis is essentially a distributed highly available key-value pair store. Since Redis itself is a highly available distributed system it can be used for caching purpose shared across multiple instances of application of any kind.
One of the key questions when dealing with Caching is what exactly should you cache. In a Django portal there different things that cache be cached like query results, objects, page views and so on. In order to understand which is the best thing to cache, we implement the caching in the Django portal using the following criteria: query results, objects and the page views.
By default Django caching mechanism caches page views. This can range from a specific view to a single page to the whole site. In order to add Redis as a caching mechanism, the default caching mechanism has to be extended to do so.This done by extending BaseCache of the Django and using the new RedisCache that extended the BaseCache to directly as the cache in the Django settings.