/** * Clears information about object from cache (useful when you manually update/delete information in database * and want to avoid stalled data). * When caching is disabled, function do nothing. * * @param id scalar Object-ID * @return void */ public function cacheClear(RM_Store_Object $object) { if (!$this->_cacheNs) { return; } $p = $object->props(); $meta = $this->_mediator->meta; foreach ($meta->keyList() as $k) { if ($k != 'id') { M('Cache')->clear($this->_cacheNs, $k . '-' . $meta->keyIdByHash($k, $p)); } } M('Cache')->clear($this->_cacheNs, 'id-' . $object->id()); }