Re: Signal-based cache invalidation & cached function decorator

2007-11-19 Thread Sergey Kirillov
That's true. So, does it looks interesting for someone? Or I'm the only one who do signal-based cache invalidation? :) On Nov 15, 2:27 am, "Honza Král" <[EMAIL PROTECTED]> wrote: > On Nov 14, 2007 9:13 PM, Sergey Kirillov <[EMAIL PROTECTED]> wrote: > > > &

Signal-based cache invalidation & cached function decorator

2007-11-14 Thread Sergey Kirillov
Hi all In my project I frequently encountered a situation where I need to cache some data, and then invalidate it on signal. So I wrote following decorator: def cached(slot_name, timeout=None): def decorator(function): def invalidate(): cache.delete(slot_name)

Django ORM

2007-02-04 Thread Sergey Kirillov
Greetings, I'd like to ask, why Django ORM has no concept of Identity Map? It is strange for me that if I call get() five times I will get five object instances, instead of five references to a single instance. Was it a design decision? I'm unable to find any discussions of this. Or I'm the

Re: Django Templates and BOM (byte order marks)

2006-12-09 Thread Sergey Kirillov
James Bennett написав: > On 12/8/06, Sergey Kirillov <[EMAIL PROTECTED]> wrote: > > For instance I have following templates (!UTF_8_BOM! = EF BB BF): > > Sort of off-topic, but why are you using a BOM in UTF-8? ;) Well, I'm not ;) But I had few legacy templates created

Django Templates and BOM (byte order marks)

2006-12-08 Thread Sergey Kirillov
Greetings, While researching strange IE behaviour at some pages of my Django-powered site I've found that Django does not handle BOM marks correctly. For instance I have following templates (!UTF_8_BOM! = EF BB BF): --- base.html !UTF_8_BOM!http://www.w3.org/TR/html4/loose.dtd;> blah-blah-blah