On 6/29/06, Jonathan Vanasco <[EMAIL PROTECTED]> wrote: > i've noticed that rose caches some information.... > > example: > i try to insert a record, but the column length is to short > i update the column in the db > i try to insert a record, but the column length is to short- rose > has cached info ( i checked to see if it was because of transactions/ > locking/handles, and it wasn't) > > thats fine... > > except i'm running under mod_perl, and there's the whole pre-fork > shared memory stuff -- is there any suggested way of maximizing what > i cache early on , so it all goes into shared space? or maybe even > turning off the caching of info.
Well, you can't have it both ways. Either you want memory to be shared, in which case all the class setup and initialization can only happen once, in the Apache parent process, before the first fork, or you want everything to update "in real time" with db schema changes, in which case each apache child will now have its own "dirty" memory as a result of those updates. The simplest solution is to restart the server after any db schema change. If you really want to keep things in sync in a running server, you'll have to have some check before processing each request that re-initializes each RDBO class if its underlying table has changed. Those checks are likely to be expensive, however, since you probably have to run at least on db query per table to see if it's been updated (then more to re-init your classes if it has). You could perhaps make this more efficient by having a flag file somewhere containing the names of the classes to re-initialize, but now this is getting complicated. And this still doesn't solve the shared memory issue, which is basically intractable. You either do it in the parent before fork or it's not shared. No (reasonable*) way around it. -John * I've done the SysV shared memory thing and, trust me, it's not worth the pain... :-} Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 _______________________________________________ Rose-db-object mailing list Rose-db-object@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/rose-db-object