if youre looking to work at the statement interception level, we do  
have an API for that, called ProxyConnection, available in 0.5 under  
lib/sqlalchemy/interfaces.py.  It seems like this would be required  
since you'd like to make decisions based on direct SQL execution.

not sure how you'd do things like "only write tables out every 10  
minutes" riding underneath the ORM session though, if you mean to be  
intercepting its attempts to write rows and then delay that.    That  
sounds like something that would ride on *top* of the ORM.




On May 19, 2008, at 2:15 PM, TP wrote:

>
> Hi, we have a DB app that uses SQLAlchemy and we'd like to add some
> custom DB caching logic. Unfortunately, there are no simple choke
> points that everything flows through where we could add this caching
> other than SQLAlchemy.
>
> We'd like to do things such as say "invalidate the cache if tables X,
> Y and Z are updated / inserted" or "batch inserts to tables X and Y
> and only write them out every 10 minutes".
>
> I noticed that Sessions have an interface for SessionExtensions that
> would let me look at pending instances associated with the session at
> commit time. However, it looks like this would only capture updates
> made through the ORM APIs? Unfortunately we have people doing
> (relatively simple) direct SQL execution through Session.execute() as
> well.
>
> Any ideas other than rewrite everything that uses a proper API above
> SQLAlchemy to do the caching?
> >


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"sqlalchemy" group.
To post to this group, send email to sqlalchemy@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/sqlalchemy?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to