Re: [SQLObject] load balancing and SQLObject cache

2011-07-19 Thread Oleg Broytman
On Tue, Jul 19, 2011 at 05:30:43PM +0400, Oleg Broytman wrote: >Expired cache stores weak references. I.e. while the program is > holding a (non-weak) reference to a row the cache will return the same > row. This is to prevent having two different (unsynchronized) objects to represent the s

Re: [SQLObject] load balancing and SQLObject cache

2011-07-19 Thread Oleg Broytman
On Tue, Jul 19, 2011 at 09:39:55AM -0300, Егор Следов wrote: > It does not seem to work. When I set cache to 0 and debug to 1 in uri > > DB URI ('postgres://host/db?cache=0&debug=1') > > f = db.Person.get(5) > print f.name > f1 = db.Person.get(5) > print f1.name > > I don't see second select to

Re: [SQLObject] load balancing and SQLObject cache

2011-07-19 Thread Егор Следов
It does not seem to work. When I set cache to 0 and debug to 1 in uri DB URI ('postgres://host/db?cache=0&debug=1') f = db.Person.get(5) print f.name f1 = db.Person.get(5) print f1.name I don't see second select to the database on second get. Apparently, the value is fetched from expiredCache.

Re: [SQLObject] load balancing and SQLObject cache

2011-07-19 Thread Oleg Broytman
On Tue, Jul 19, 2011 at 12:21:32AM -0300, Егор Следов wrote: > I have a web application with two load-balanced webservers and a separate > postgres database server. > > When SQLObject instance is updated, the update is processed randomly through > either of the servers. > Sometimes user does th

[SQLObject] load balancing and SQLObject cache

2011-07-18 Thread Егор Следов
I have a web application with two load-balanced webservers and a separate postgres database server. When SQLObject instance is updated, the update is processed randomly through either of the servers. Sometimes user does the update on one server, and immediately opens object for reading on ano