Its the only way to do this, as long as django auth is required.
You can write your own static file serving function and add caching
(memcache?) to it.
But you can try to, for example, make directories named like session
cookie hash and force user to get all static content there, serving
thgouh apache
You may be interested in:
http://code.djangoproject.com/ticket/2131
Both mod_python and mod_wsgi support the ability to return a
header that instructs the web-server to "dump this local file
back as my response" freeing up Django resources. This patch,
though not yet accepted, has undergone a lot of scrutiny (as you
can read in the long list of comments) and even if the One True
Solution hasn't yet been committed to trunk, it looks like this
should work if you tinker with it. But I too am looking forward
to it hitting trunk.
-tim
note that you can simply return that same header without waiting for
this patch. the main advantage will be that it automatically uses the
appropriate header for different servers.
--
Javier
http://docs.djangoproject.com/en/dev/howto/apache-auth/
Gabe