I'm using SQLObject 0.7.1a on 2 multimaster replicated mysql servers to
have both high availability and load balancing.
I noticed coherency problems between mysql and the application. So I
suspected the cache.
I'm now trying to disable the cache by adding &cache= in the connection url.
With the connection debug, I can't notice any behaviour change with or
without this option.
I can see that connection.doCache is set according to the url parameter,
but no effect.
I can still see that sqlobject is fetching all data when doing a
iterating a select.
But not when accessing a multipleJoin. For the multiple join access to
refetch the data I have to make a connection.cache.clear(), with or
without the option.
Same behaviour when doing a sqlclass.get(id), data is fetched only once
also with or without the option.
I can't see where is the action of connection.doCache. Can someone
I also tried sqlmeta cacheValues to False, the it is catastrophic,
because each column of a row is fetched one by one!
How is it possible to have a behaviour not as agressive as cacheValues
On Tue, Feb 13, 2007 at 01:31:28AM +0100, sophana wrote:
> I can still see that sqlobject is fetching all data when doing a
> iterating a select.
> But not when accessing a multipleJoin. For the multiple join access to
> refetch the data I have to make a connection.cache.clear(), with or
> without the option.
> Same behaviour when doing a sqlclass.get(id), data is fetched only once
> also with or without the option.
Even with doCache=False SQLObject cache does some caching in cache.py -
CacheFactory.put() stores a weak reference in self.expiredCache, and
CacheFactory.get() retrieves the references if it is not None, i.e. if the
referred object is alive (there are non-weak references to it).
Oleg Broytmann http://phd.pp.ru/ phd@...
Programmers don't die, they just GOSUB without RETURN.