the bigger issue is how should a cache implementation be integrated with SQLAlchemy in the first place. I dont think caching is so simple; for example, I dont just want to cache an object based on its ID. I want to cache the results of all kinds of queries which do expensive joins and sorts as well. so, do we cache the results of all SQL statements as well ? its not always appropriate, and there are a lot of variables that might change on a query-by-query basis. So, its not clear to me how a cache would be "integrated" with SA...because the usage patterns would vary greatly, it still seems like a layer that should ride on top of SA and be specific to a particular application. If someone were to contribute such a layer and it became obvious that there are two or three patterns that are extremely common and widely useful, that would begin to formulate how such a layer could be more integrated. I dont yet see the value in a straight "id" cache, which is very easy to implement by oneself, and were it included as core functionality would result in a whole new crop of user errors and confusion that then get reported as bugs (i.e. stale objects, inconsistent results as some objects get flushed from the cache others dont, etc.).

generally, I am trying to keep SQLAlchemy as simple as possible, and I am avoiding any feature which solves only a small portion of a particular prolbme space...it has to be a total killer feature otherwise its not worth the support. if you can propose a total "killer" version of it, im definitely interested.

On a related note, if you are interested in Memcached, there is a container API already being looked at by the Pylons and Turbogears crew which I wrote for Myghty which provides "switchable" backends to flat files, DBM files, dictionaries, and memcached, originally written to replace Cache::Cache which is used with HTML::Mason. If I were to implement caching in SQLAlchemy, I might very well use that API (or an enhanced version of it).

On Mar 14, 2006, at 6:39 AM, Florian Boesch wrote:

Hi,

I just stumbled upon memcached, which seems to be one of the finer
implementations of distributed tuple spaces. It is used for caching objects.
Any idea if things like this could be integrated with sqlalchemy.

Cheers,
Florian


-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language that extends applications into web and mobile media. Attend the live webcast and join the prime developer group breaking into this new coding territory! http://sel.as-us.falkag.net/sel? cmd=lnk&kid=110944&bid=241720&dat=121642
_______________________________________________
Sqlalchemy-users mailing list
Sqlalchemy-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sqlalchemy-users



-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
_______________________________________________
Sqlalchemy-users mailing list
Sqlalchemy-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sqlalchemy-users

Reply via email to