Reset the item cache when a child is removed
974574
def child_removed(self, child):
        
        super(AbstractItemView, self).child_removed(child)
        self.get_member('_items').reset(self)
1152489
def set_remove(parent, idx, value):
  """"""
  lst = get_child(parent, idx)
  if value in lst:
    lst.remove(value)
687527
public function afterDelete()
    {
        if ($this->cachedDeletedId) {
            foreach (NavItemPageBlockItem::find()->where(['block_id' => $this->cachedDeletedId])->all() as $item) {
                $item->delete();
            }
        }
        parent::afterDelete();
    }
99935
function() {
            var s = Storage.storage();
            if (s == null) {
                return false;
            }
            Object.keys(s).forEach(function(key){
                   if (/^(cache_)/.test(key)) {
                       s.removeItem(key);
                   }
            });
        }
377993
public void reset() {
	  expirationTimeFlag = UNSET;
      inactivityFlag = UNSET; 
	  idFlag = UNSET;
	  priorityFlag = UNSET;
	  sharingPolicyFlag = UNSET;
	  lock = UNSET;
	  id = null;
	  timeLimit = -1;
      inactivity = -1;
   	  expirationTime = -1;
   	  validatorExpirationTime = -1;
	  priority = -1;
	  sharingPolicy = NOT_SHARED;
	  persistToDisk = true;   
	  templates.clear();
	  template = null;
	  dataIds.clear();
	  aliasList.clear();
	  userMetaData = null;
      entryInfoPool = null;
      cacheType = CacheEntry.CACHE_TYPE_DEFAULT;
      externalCacheGroupId = null;
  }
759889
def reset(self):
        
        for _, item in self.iter_items(recursive=True):
            item.reset()
1361602
def child_removed(self, child):
        
        layout = self.layout
        if child.widget is not None:
            layout.removeArrangedSubview(child.widget)
            layout.removeSubview(child.widget)
641427
def removeItem( self, item ):
        
        # for nodes and connections, call the prepareToRemove method before 
        # removing
        if ( isinstance( item, XNode ) or 
             isinstance( item, XNodeConnection ) ):
            # make sure this item is ok to remove
            if ( not item.prepareToRemove() ):
                return False
        
        # remove the item using the base class method
        try:
            self._cache.remove(item)
        except KeyError:
            pass
        
        # mark the scene as modified
        self.setModified(True)
        super(XNodeScene, self).removeItem(item)
        
        if not self.signalsBlocked():
            self.itemsRemoved.emit()
        
        return True
473571
def _reset(self):
        """"""
        self.log.info("Clearing the cache, resetting event offsets")
        self.raw_header = None
        self.event_offsets = []
        self.index = 0
529908
def _reatach(self):
        """"""
        for item, p, idx in self._detached:
            # The item may have been deleted.
            if self.treeview.exists(item) and self.treeview.exists(p):
                self.treeview.move(item, p, idx)
        self._detached = []
1019447
def child_added(self, child):
        
        super(AbstractItemView, self).child_added(child)
        self.get_member('_items').reset(self)
28627
def clear_cache(self, path, filter_name=None):
        
        if filter_name:
            self._adapter.remove_cached_item('%s/%s' % (filter_name, path))
        else:
            for filter_name in self._filter_sets:
                self._adapter.remove_cached_item('%s/%s' % (filter_name, path))
852056
static function clearTemplateOverrideCache( $cacheItem )
    {
        $cachePath = eZSys::cacheDirectory() . '/' . $cacheItem['path'];
        eZDir::recursiveDelete( $cachePath );
        eZTemplateDesignResource::clearInMemoryOverrideArray();
    }
869421
private function clearSiteCaches()
    {
        $obj = Craft::$app->sites;
        $refObject = new \ReflectionObject($obj);
        if ($refObject->hasProperty('_sitesById')) {
            $refProperty1 = $refObject->getProperty('_sitesById');
            $refProperty1->setAccessible(true);
            $refProperty1->setValue($obj, null);
        }
        if ($refObject->hasProperty('_sitesByHandle')) {
            $refProperty2 = $refObject->getProperty('_sitesByHandle');
            $refProperty2->setAccessible(true);
            $refProperty2->setValue($obj, null);
        }
        $obj->init(); // reload sites
    }
521191
def reset(self):
        """"""
        with self.lock:
            if self.cache:
                if self.use_tmp:
                    shutil.rmtree(self.tmp_dir, ignore_errors=True)
                else:
                    self.templates = {}
304002
public final void resetItemDecorations() {
        for (int i = 0; i < getRecyclerView().getItemDecorationCount(); i++) {
            try {
                getRecyclerView().removeItemDecoration(getRecyclerView().getItemDecorationAt(i));
            } catch (Exception ignored) {
            }
        }
    }
486494
protected function clearItemCache()
    {
        $sItemClass = $this->getItemClass();
        $sField = $this->sIdentifierField;

        $sItemClass::clearCache($this->obElement->$sField);
    }