[sqlalchemy] sqlalchemy + beaker cache

2011-07-27 Thread espresso maker
Hi there,

I am trying to follow the setup in this example
http://www.sqlalchemy.org/trac/browser/examples/beaker_caching to
enable beaker caching in sqlalchemy. However, I ran into an issue.

#1. When I try to cache a relation that happens to be an association
proxy I get the following error:

AttributeError: 'AssociationProxy' object has no attribute 'property'

This is how my query looks like:


def get_user(user_id):
return Session.query(User).\
   options(FromCache('default', 'user')).\
   options(RelationshipCache('default', 'user_groups',
User.groups)).\
   get(user_id)

Anyone ran into this problem?

-- 
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 
sqlalchemy+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/sqlalchemy?hl=en.



[sqlalchemy] Sqlalchemy beaker cache and memcached

2011-06-08 Thread Ɓukasz Czuja
Hi,

I reviewed a couple of messages on the list concerning caching. While:

http://www.sqlalchemy.org/trac/browser/examples/beaker_caching

is quite comprehensive, it does not include any information about
performance gains or wether this example works for more complicated
queries, joining couple of tables, returning agregates or diffrent
objects from the same query. Are there any limitations on data types
that cannot be cached? Also there is no information as wether this
example would work if beaker is setup with memcache as storage and
wether it would be faster than file storage and if so by how much?

Can any one provide some numbers on this concept? Does anyone have a
success story to share?

I'm dying to see how this performs and if it is usable on production
environment.

Any input is appreciated. Thanks in advance.

-- 
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 
sqlalchemy+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/sqlalchemy?hl=en.