Hi,

I have a web application (using apache prefork, multiple processes, no threading) where I generally want to use caching. I.e., I want to, say, do a select, and then access that object's attributes without subsequent database access.

However, I occassionaly (maybe at the start of each request?), want to reinitialize the object from the database, since the database might have changed.

How best to do that?

I see two methods mentioned (indirectly):

a. set the object.sqlmeta.expire -> True

b. call connection.cache.clear()

Well, (a) doesn't seem to do anything. (After setting, I try to access the object's attributes - but no database access occurs)

And (b) works, but I am concerned with the comment in the code: "Warning!! This can cause duplicate objects in memory."

Can an sqlobject expert prehaps shed some light here?

Thanks!

David Geller


-------------------------------------------------------
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
_______________________________________________
sqlobject-discuss mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/sqlobject-discuss

Reply via email to