If you mix dynamic and static data on one page, in your case dynamic data is the registered username, then caching pages is not the right choice. This will not change if you use the file storage cache instead of memcached.
I suggest trying fragment caching. You can do something like this:
{% load cache %} {% cache 500 sidebar %} .. sidebar .. {% endcache %}
This caches the contents of the cache tag for 500 seconds using the identifier sidebar.
Further information on caching can be found here:
http://docs.djangoproject.com/en/dev/topics/cache/
If this is a page that will be hit frequently, for example, a welcome page that, in your opinion, will benefit from using page caching for fragment caching (for example, the only dynamic data is the username), then there are several other options.
Say, for example, that you want to have a fully static page, except for the login / logout section at the top, which displays different links depending on whether the user is logged in or not, you can check for an authentication cookie when the page first loads and conditionally displays different data using javascript.
jonnii
source share