Removes resource with a given internal id from cache.
@param string $id resource repo internal id
@throws NotInCache
184790
public function deleteById(string $id) {
        if (!isset($this->id2uri[$id])) {
            throw new NotInCache();
        }
        $this->deleteByUri($this->id2uri[$id]);
    }
1023313
public void removeFromCache(String id) throws DaoManagerException{
		if (map.containsKey(id)){
			map.remove(id);
		} 
	}
272087
public function destroy($id)
    {
        $modelName = $this->modelFullName;
        $int = $modelName::destroy($id);
        if(!$int) throw new NotFoundException('There is no Resource with id = ' . $id . ' !');
        return $int;
    }
571260
public function remove($id)
    {
        try {
            if (\apc_delete($id)) {
                $this->removeFromHashmapById($id);

                return true;
            }
        } catch (\Exception $e) {
            $this->log('warning', \sprintf('Unable to delete cache for id %s : %s', $id, $e->getMessage()));

            return false;
        }
    }
1177788
public function delete($id)
    {
        $item = $this->itemRepository->findById($id);

        if (!$item) {
            throw new ItemNotFoundException($id);
        }

        $this->em->remove($item);
        $this->em->flush();
    }
956124
public function delete($id)
	{
		return file_exists($this->_cache_path.$id) ? unlink($this->_cache_path.$id) : FALSE;
	}
508261
final public function destroy($id = "")
    {

        $id = !empty($id) ? $id : $this->getId();
        $now = time();

        if (empty($id)) {
            return false;
        }

        setcookie(session_name(), '', $now - 42000, '/');

        if (session_id()) {
            @session_unset();
            @session_destroy();
        }

        //Delete from db;
        //Do a garbage collection
        $this->gc($id);
    }
1048882
public function destroy($id)
    {
        $class = $this->model;

        return $class::destroy($id)
            ? ['success' => ucfirst($this->readableResourceType()) . ' removed successfully.']
            : ['error' => 'There was a problem removing the ' . $this->readableResourceType() . '.'];
    }
517295
public function destroy($id)
    {
        $this->guardAgainstMissingParent('destroy');

        $this->shopify->delete($this->path($id));
    }
1086556
private function removeFromMetaData($id) {
        $storageFileName = $this->directory . $id . '.info';
        if (file_exists($storageFileName) && is_writable($storageFileName)) {
            unset($storageFileName);
            return true;
        }
        return false;
    }
551469
public function getById(string $id): FedoraResource {
        if (!isset($this->id2uri[$id])) {
            throw new NotInCache();
        }
        return $this->cache[$this->id2uri[$id]];
    }
906103
public function forget($id)
    {
        return $this->resolver->createCommand()->delete($this->table, ['id' => $id])->execute();
    }
1260455
public function delete($id)
    {
        $tag = $this->tagRepository->findTagById($id);

        if (!$tag) {
            throw new TagNotFoundException($id);
        }

        $this->em->remove($tag);
        $this->em->flush();

        // throw an tag.delete event
        $event = new TagDeleteEvent($tag);
        $this->eventDispatcher->dispatch(TagEvents::TAG_DELETE, $event);
    }
926952
public function remove( $id ){
		$this->table->focusPrimary( $id );
		$result	= FALSE;
		if( count( $this->table->get( FALSE ) ) ){
			$this->table->delete();
			$result	= TRUE;
		}
		$this->table->defocus();
		$this->cache->remove( $this->cacheKey.$id );
		return $result;
	}
503887
public function destroy($id)
    {
        $image = $this->repository->find($id);

        if (is_file(storage_path($image->location))) {
            Storage::delete($image->location);
        } else {
            Storage::disk(Config::get('cms.storage-location', 'local'))->delete($image->location);
        }

        if (empty($image)) {
            Cms::notification('Image not found', 'warning');

            return redirect(route($this->routeBase.'.images.index'));
        }

        $image->forgetCache();
        $image->delete();

        Cms::notification('Image deleted successfully.', 'success');

        return redirect(route($this->routeBase.'.images.index'));
    }
507548
protected static function invalidateCache($id)
    {
        $type = static::getType();

        $id = (string)$id;

        static::initializeCache($type);

        $collection = self::$cache->{$type};

        unset($collection->{$id});
    }
1217825
private function removeFromHashmapById($id)
    {
        try {
            foreach ($this->_hashmap as $tag => $vars) {
                foreach (array_keys($vars) as $key) {
                    if ($key == $id) {
                        unset($this->_hashmap[$tag][$key]);

                        return $this->saveHashmap();
                    }
                }
            }
        } catch (\Exception $e) {
            $this->log('warning', \sprintf('Unable to remove id from hashmap %s : %s', $id, $e->getMessage()));

            return false;
        }

        return false;
    }