Clear any cached errors / metadata for this image

@param string $hash
@param string|null $variant
964187
protected function markSuccess($hash, $variant = null)
    {
        $key = $this->getErrorCacheKey($hash, $variant);
        $this->getCache()->deleteMultiple([
            $key.'_reason',
            $key.'_ttl'
        ]);
    }
212740
protected function deletePasswordRequestData($hash) 
    {
        $table = $this->getServiceLocator()->get('MelisLostPasswordTable');
        $data = $this->getPasswordRequestData($hash);
        
        if($data)
            $table->deleteByField('rh_hash', $hash);
    }
512953
private function processFileFromFilesystem($file, $hash)
    {
        $hashFromCache = $this->cache->read($file);

        if ($hashFromCache) {
            if ($hash != $hashFromCache) {
                $this->cache->write($file, $hash);
                $this->updatedFiles[] = $file;
            }
        } else {
            $this->cache->write($file, $hash);
            $this->newFiles[] = $file;
        }
    }
722735
public static function clearCache()
    {
        if (self::$_cacheTags) {
            self::$_cache->clean(Zend_Cache::CLEANING_MODE_MATCHING_TAG, array('Zend_Locale'));
        } else {
            self::$_cache->clean(Zend_Cache::CLEANING_MODE_ALL);
        }
    }
713797
protected static function deleteVariantByIdAsyncWithHttpInfo($variant_id) 
    {
        $returnType = '';  
        $request = self::deleteVariantByIdRequest($variant_id); 

        return self::getHttpClient()
            ->sendAsync($request, self::createHttpClientOption())
            ->then(
                function ($response) use ($returnType) {
                    return [null, $response->getStatusCode(), $response->getHeaders()];
                },
                function ($exception) {
                    $response = $exception->getResponse();
                    $statusCode = $response->getStatusCode();
                    throw new ApiException(
                        sprintf(
                            '[%d] Error connecting to the API (%s)',
                            $statusCode,
                            $exception->getRequest()->getUri()
                        ),
                        $statusCode,
                        $response->getHeaders(),
                        $response->getBody()
                    );
                }
            );
    }
403487
public void removeFile(VariantFileMetadata file, String studyId) {
        // Sanity check
        if (file == null) {
            logger.error("Variant file metadata is null.");
            return;
        }
        removeFile(file.getId(), studyId);
    }
998719
public function removeByHash(string $hash): void
    {
        $results = $this->findBy(['hashKey' => $hash]);

        foreach ($results as $result) {
            $this->getEntityManager()->remove($result);
        }

        $this->getEntityManager()->flush();
    }
844078
public function removeVariant(VariantInterface $variant)
    {
        if ($this->hasVariant($variant)) {
            $variant->setObject(null);
            $this->variants->removeElement($variant);
        }

        return $this;
    }
748243
public function forget($view, $key = null, $tag = null)
    {
        $cacheKey = $this->getCacheKeyForView($view, $key);

        if ($this->cacheIsTaggable) {
            $tags = $this->getTags($tag);
            $this->cache->tags($tags)->forget($cacheKey);
        }

        $this->cache->forget($cacheKey);
    }
906361
protected function clearCacheRoot()
    {
        /** @var \SplFileInfo $file */
        foreach (Filesystem::items(WINDWALKER_CACHE, false) as $file) {
            if (in_array($file->getBasename(), ['.gitignore', '.htaccess', 'web.config'])) {
                continue;
            }

            if ($file->isDir()) {
                Folder::delete($file->getPathname());
            } else {
                File::delete($file->getPathname());
            }

            $this->out(sprintf('[Deleted] <info>%s</info>', $file->getPathname()));
        }
    }
128070
private function assertOnHoldQuantityOfVariant($expectedAmount, $variant)
    {
        $actualAmount = $this->indexPage->getOnHoldQuantityFor($variant);

        Assert::same(
            $actualAmount,
            (int) $expectedAmount,
            sprintf(
                'Unexpected on hold quantity for "%s" variant. It should be "%s" but is "%s"',
                $variant->getName(),
                $expectedAmount,
                $actualAmount
            )
        );
    }
528142
protected function markFailed($hash, $variant = null, $reason = self::FAILED_UNKNOWN)
    {
        $key = $this->getErrorCacheKey($hash, $variant);

        // Get TTL for error
        $errorTTLs = $this->config()->get('error_cache_ttl');
        $ttl = isset($errorTTLs[$reason]) ? $errorTTLs[$reason] : $errorTTLs[self::FAILED_UNKNOWN];

        // Detect increasing waits
        if (is_string($ttl) && strstr($ttl, ',')) {
            $ttl = preg_split('#\s*,\s*#', $ttl);
        }
        if (is_array($ttl)) {
            $index = min(
                $this->getCache()->get($key.'_ttl', -1) + 1,
                count($ttl) - 1
            );
            $this->getCache()->set($key.'_ttl', $index);
            $ttl = $ttl[$index];
        }
        if (!is_numeric($ttl)) {
            throw new LogicException("Invalid TTL {$ttl}");
        }
        // Treat 0 as unlimited
        $ttl = $ttl ? (int)$ttl : null;
        $this->getCache()->set($key.'_reason', $reason, $ttl);
    }
1126251
public static function clearStatCache($filename = null) {
    if (!empty($filename)) {
      unset(self::$stat_cache[self::getHashValue($filename)]);
    } else {
      self::$stat_cache = [];
    }
  }
1068182
public function addVariant(VariantInterface $variant)
    {
        if (!$this->hasVariant($variant)) {
            $variant->setObject($this);
            $this->variants->add($variant);
        }

        return $this;
    }
573588
public function setHash($hash)
    {
        if (!preg_match("/[0-9a-f]{32}/", $hash)) {
            throw new InvalidArgumentException("Asset cache buster hash must be a valid md5 hash.");
        }
        $hash = trim($hash, '/');

        $this->hash = $hash;
    }
855174
@Override
	public String getBundleDataHashCode(String variantKey) {
		if (StringUtils.isEmpty(variantKey)) {
			return this.urlPrefix;
		} else {
			return (String) prefixMap.get(variantKey);
		}
	}
526640
function clear_errors( $emask = null ) {
		foreach( $this->err_stack as $t => $ids ) {
			if( $emask !== NULL && ( $emask & $t ) == 0 ) {
				// ignore this error
				continue;
			}
			// clear these errors
			foreach( $ids as $id ){
				$Err = PLUGError::get_reference( $t, $id );
				$Err->clear();
			}
			unset( $this->err_stack[$t] );
		}
	}