Fair enough about the example stuff; I kind of figured, but thought I'd 
just share my experience.  It's such a fine-line between authors getting a 
bead on real-world usage vs. hearing the same question over and over again.

Previously, I had it just using the "binds" that were in the Query, but we 
> had cases where bound parameters were embedded in the statement too 
> affecting things.   So as a quick fix I changed it to just traverse the 
> whole statement, but this can be optimized significantly more than it is. 
>  It's the way it is so that it "works" more completely on the first 
> go-around.


Is there a thread I can pull at here?  I'd love to here about performant 
key generation options that are more flexible than explicit cache keys 
(obviously that is highly prone to developer error).   Looking at the query 
class, I'm guessing you are still using md5(unicode(query.statement)) for 
the query portion of the key, but what are you using for "binds"?  (Sorry, 
not quite familiar with the internals of SQLAlchemy yet -- and I can't find 
that attribute or anything similar in the source)  Are there other 
alternatives for cache keys that are worth exploring?  (and feel free to 
just post links or what have you, I'm happy to do the reading)

-- 
You received this message because you are subscribed to the Google Groups 
"sqlalchemy" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/sqlalchemy/-/JvefOSuw1FwJ.
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.

Reply via email to