Hello, reader!

My name is Eugene Lazutkin.

I'm a software developer based in the Dallas-Fort Worth metroplex. Lazutkin.com is my professional blog, which contains short writeups and presentations regarding modern web applications. All articles here are written by myself, unless stated otherwise.

Something wrong with simple cache

I am not talking about multithreading problems. locmem: doesn’t have them. But it does have problems with gzip. Sometimes I see binary stuff on my screen. It looks like a gzipped web page without proper gzip encoding flag. I don’t do anything related to compression in my cache.

Is it a bug in Django’s caching? Hmm… Apparently it works properly with memcache. Can it be some bug in simple: implementation, which was a base for locmem:? Weird.

Update: Yes, something is wrong. I found one small bug and one weirdness. The bug is easy to fix. But I don’t know what to do about the weird part. Apparently if you store HttpResponse object, it behaves like it is modified by some means. But if you pickle it, everything goes smoothly. I’ll try to dig up more on that.

Of course, local debugging doesn’t help. Does it indicate some other Dreamhost-specific problem?