Are RDBOC objects cached through different processes? I'm thining of running it in mod-perl, and it would factor into things, even though it would mostly be used on things that don't change (much).
Also, do relationships referencing RDBOCs use the cache when it should intuitively?
Rose::DB::Object::Cached
caches objects in plain-old (non-shared) memory. Under mod_perl, this means that each apache process has its own cache. You could, however, cache your objects on server startup. All of those cached objects would then be shared with each apache child process. This is most useful for read-only objects that you don't ever expect to change for the life of the server.
For more flexible caching options, check out Rose::DBx::Object::Cached::CHI
.
As for your second question, Rose::DB::Object::Cached
only reads from and writes to the cache on load()
and save()
. Most relationship methods use Manager queries to get objects and so will not read from the Rose::DB::Object::Cached
cache.