I want to use Memcache in my django application. Ι want to be able to use cache per view. But I hanvent understood something in caching. Lets say I have the following view
def view(request, customer_id):
#some view functionality here
return queryset #which my different according to some posting data
Suppose I cache this view
@cache_page(60*15)
def view(request, customer_id):
#some view functionality here
return queryset
According to this if a user visits my page associated to the "view" it will be cached and then retrieved from cache. What would be cached? The queryset? or the template? But what about the queryset that could be different according to some post data(e.g a search view)? Could you be a little bit more explanatory on how to use cache for querysets? Should I cache querysets that change a lot? Or not?