Simon Cross a écrit :
> On 3/21/07, sophana <[EMAIL PROTECTED]> wrote:
>   
>> I'm suspecting the cache cull system.
>> How can I disable the cull system?
>>     
>
> Mine own solution to this problem was to create an external cache
> (outside SQLObject) which explicitly keeps references to the objects I
> use often.
>
> So at start up I do something like:
>
> cache = list(CommonObjTable.select())
>
> Then SQLObject never removes these objects from the cache since there
> are still references to them (provided the variable cache itself is
> not dereferenced).
>
>   
This is not exactly what I'm looking for.
Note: if you disable the cache, they won't be in the cache as there is
no cache, but in the expiredCache.
I think this means they still get reloaded each time when accessed
(selected). Am I right?

I just wanted to clear the cache at the begining of every web
transaction instead of simply disabling the cache completely.
cache.clear() is NOT a good solution. I tried it and noticed data
corruption! It is not thread safe!
cache.weakrefAll() (which should be called expireAll...) seems a good
alternative.


-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
sqlobject-discuss mailing list
sqlobject-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sqlobject-discuss

Reply via email to