On 8/22/06, Jonathan Vanasco <[EMAIL PROTECTED]> wrote:
> do i need to do anything to not have rose internally cache stuff, or
> periodically clear it out?  or is caching only used when items are
> inherited from Rose::DB::Object::Cached ?
>
> I seem to remember something about caching on loads/saves.

Methods that say they fetch stuff form the DB actually do what they
say, with no caching.  Rose::DB::Object::Cached changes load() to pull
from a cache instead of the db.  But even then, there are ways to
override this behavior and/or clear out the cache.

There are also methods that pull from the DB only if there's no info
already loaded.  For example, relationship and foreign key methods:

  $product = Product->new(id => 123)->load; # hit db
  $vendor  = $product->vendor; # hit db to get related item
  $vendor  = $product->vendor; # doesn't hit db; already fetched earlier

The behavior of such methods is documented.  So again, no "sneaky"
caching behind the scenes, just documented behavior.

-John

-------------------------------------------------------------------------
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

Reply via email to