From: Laurence R. <l...@lr...> - 2012-05-02 17:51:44
|
On 2 May 2012 19:32, Spanky <sp...@ka...> wrote: > The behavior that I've seen contradicts this. I have 4 instances on two > boxen. When I recook, I only get new cachekeys from ONE instance and I > have to restart all the rest of the instances or else I get no CSS and > the whole site goes to poop. > > It may be accurate in that the change is persisted in the DB, but the > change is not reflected across all instances. I suspect it is in RAM > cache or this ResourceRegistryCache which is not shared. > > Not sure what to do about this, but be VERY careful about recooking. Yup, looking at the code in RR where it does self.ZCacheable_invalidate() it doesn't invalidate caches in other instances. (This is why I tend to use _v_ attributes instead as updating the object causes other clients to invalidate their copies on the ZODB level.) A simple fix might be to add self._p_mtime into the keywords for ZCacheable_get. Laurence |