Questions tagged [django-cache]

Django includes a cache system that lets you save dynamic pages or page fragments so they don't have to be generated for each request.

Django comes with a robust cache system that lets you save dynamic pages so they don't have to be calculated for each request. For convenience, Django offers different levels of cache granularity: You can cache the output of specific views, you can cache only the pieces that are difficult to produce, or you can cache your entire site.

Django also works well with "upstream" caches, such as Squid and browser-based caches. These are the types of caches that you don't directly control but to which you can provide hints (via HTTP headers) about which parts of your site should be cached, and how.

See also:

248 questions
0
votes
0 answers

Django can't clear database cache on Oracle backend

I have one row in my oracle cache table. I'm trying to clear it using standard django way: from django.core.cache import cache cache.clear() But it doesn't work! The row is still in my cache table. So I run python manage.py sell and put some code…
mnowotka
  • 16,430
  • 18
  • 88
  • 134
0
votes
1 answer

How to handle Django sessions properly

I have the following requirements: Users must be able to see (and log out) their other sessions. Sessions must expire BOTH at browser close and after a perioid of inactivity. default database can not be used to store sessions. My current approach…
Kimvais
  • 38,306
  • 16
  • 108
  • 142
0
votes
1 answer

At what point does a cache key get correctly generated

In the according to the docs it effectively says that you should use a KEY_PREFIX when sharing a cache instance between servers. My question is when does is at what point does the KEY_PREFIX apply? Using MemcachedStats here is basic example from…
rh0dium
  • 6,811
  • 4
  • 46
  • 79
0
votes
1 answer

Apply a never_cache to a flatpage view

I want to create a home view that is the same as a home view but does not cache it. urlpatterns += patterns('django.contrib.flatpages.views', url(r'^$', 'flatpage', {'url': '/'}, name='home'), ) Something like this urlpatterns +=…
rh0dium
  • 6,811
  • 4
  • 46
  • 79
0
votes
1 answer

How to cache dehydrate method in django-tastypie resource?

I'm using django-tastypie to make resources for models. Can you help tell me how to cache dehydrate method of my ArtistResource? And what extra django settings should i provide to use cache? Thanks very much. I've never used cache before, so i'm…
Feanor
  • 3,568
  • 5
  • 29
  • 49
0
votes
1 answer

django-cms: wrong current page language

I have a multilanguage site (it, en, ru) that use django-cms with some apps hooked on various page. my problem is that the content is always served in italian, even if i visit pages with '/en/' or '/ru/' as prefix. On my base template (base.html) i…
Luke
  • 1,794
  • 10
  • 43
  • 70
0
votes
1 answer

Django Johnny-Cache TypeError

I can't figure this out, and couldn't find a solution after googling around. I'm implementing caching for my Django app. The steps I took were: brew install libmemcache, which installed memcache as well pip install pylibmc pip install -e…
Murph
  • 511
  • 7
  • 16
0
votes
1 answer

Pre cache django REST views

I have a REST-ful service implemented with django and for each ressource accessed I would like to cache related data that could be likely accessed. For instance the ressource http://www.example.com/publication/1280 would give the xml response:…
renard
  • 1,368
  • 6
  • 20
  • 40
1 2 3
16
17