Wiktor Grębla wrote: > > I've a "testing" Django configuration with lighttpd (flup + > django-fastcgi.py) on FreeBSD. Everything seems to work fine, but there > is one thing "misbehaving": cacheing when CACHE_BACKEND = 'locmem:///'. ... > If I set CACHE_BACKEND = 'db://some_table' it's working as expected > (that's where my guess about "separate interpreters" issue came from).
'locmem:///' is a thread-safe process-local memory cache. Every process has its own unique instance. Why? It was meant to be used for caching of immutable, but expensive-to-calculate values. In your case (making a global snapshot of a variable) it'll create one snapshot per process. It looks like you have a multiprocess setup, which spawns a bunch of processes, which are used as a pool for web request processing without fixing users to processes (the most common setup). 'db://some_table' provides a global cache, which can be shared by different processes, even by different instances of web servers handling different web sites. It can be used in a manner you described. That's why it works for you. If having a memory-based global cache is essential for you for performance reasons, I suggest to take a look at 'memcached:' cache backend. Otherwise 'db:' and 'file:' are viable options. Personally I use the 'file:' cache backend and it works fine for me. Thanks, Eugene --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users -~----------~----~----~----~------~----~------~--~---