On Thu, Jul 21, 2011 at 10:32:08AM +0200, Simon Cross wrote:
> I encountered a similar need in one of my own projects and wrote a
> caching version of RelatedJoin that you could probably take ideas from
> for a caching version of MultipleJoin / ForeignKey.  You can find the
> code at 
> http://sutekh.svn.sourceforge.net/viewvc/sutekh/trunk/sutekh/sutekh/core/CachedRelatedJoin.py?revision=2873&view=markup.
> I considered contributing it back to SQLObject but it's a bit finicky
> to use -- one has to manually initialize the cache (see init_cache

   It would be an interesting additions even if it's not suitable for
the SQLObject core. I can add it to sqlobject/include if you document it
and add an example or even better - a test.

> method) and then flush the cache (flush_cache) or just particular

   SQLObject usually uses the word "clear" instead of flush. ;-)

> items (invalidate_cache_item) from within one's application as needed.

   Populating/clearing the cache is too application-specific, it'd be
hard to program a universal solution. But if there is a documented API
for applications to use - no problem.

Oleg.
-- 
     Oleg Broytman            http://phdru.name/            p...@phdru.name
           Programmers don't die, they just GOSUB without RETURN.

------------------------------------------------------------------------------
5 Ways to Improve & Secure Unified Communications
Unified Communications promises greater efficiencies for business. UC can 
improve internal communications as well as offer faster, more efficient ways
to interact with customers and streamline customer service. Learn more!
http://www.accelacomm.com/jaw/sfnl/114/51426253/
_______________________________________________
sqlobject-discuss mailing list
sqlobject-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sqlobject-discuss

Reply via email to