[CDBI] Forced reloads from the DB

Perrin Harkins perrin at elem.com
Tue Apr 18 18:32:20 BST 2006


On Tue, 2006-04-18 at 12:18 -0500, Andrew Melo wrote:
> Is there a method to only clear the object cache for a single row?

$obj->remove_from_object_index();

>  I am 
> aware of Class::DBI::clear_object_cache but, there are a lot of tables 
> that are effectively static, and nuking the cache makes things drag when 
> I have to go and reload them all again.

Are you sure?  There is no cache, and the object index is not intended
to help with performance at all.

> I'm having troubles with updates 
> on one machine not being propagated to others because of the caching 
> mechanism (there are well-defined times when certain objects are 
> modified, so ideally, I'd like to use my knowledge of when stuff is 
> updated to cause a reload)

Sounds like you have a scoping bug somewhere.  No object that goes out
of scope is still in the object index.

- Perrin





More information about the ClassDBI mailing list