public function FileMetadataPluginBase::deleteCachedMetadata in File metadata manager 8
Same name and namespace in other branches
- 8.2 src/Plugin/FileMetadata/FileMetadataPluginBase.php \Drupal\file_mdm\Plugin\FileMetadata\FileMetadataPluginBase::deleteCachedMetadata()
Removes cached metadata for file at URI.
Uses the 'file_mdm' cache bin.
Return value
bool TRUE if metadata was removed, FALSE otherwise.
Overrides FileMetadataPluginInterface::deleteCachedMetadata
3 calls to FileMetadataPluginBase::deleteCachedMetadata()
- FileMetadataPluginBase::loadMetadata in src/
Plugin/ FileMetadata/ FileMetadataPluginBase.php - Loads file metadata from an in-memory object/array.
- FileMetadataPluginBase::loadMetadataFromFile in src/
Plugin/ FileMetadata/ FileMetadataPluginBase.php - Loads file metadata from the file at URI/local path.
- FileMetadataPluginBase::saveMetadataToFile in src/
Plugin/ FileMetadata/ FileMetadataPluginBase.php - Saves metadata to file at URI.
File
- src/
Plugin/ FileMetadata/ FileMetadataPluginBase.php, line 528
Class
- FileMetadataPluginBase
- Abstract implementation of a base File Metadata plugin.
Namespace
Drupal\file_mdm\Plugin\FileMetadataCode
public function deleteCachedMetadata() {
if ($this
->isUriFileMetadataCacheable() === FALSE) {
return FALSE;
}
$plugin_id = $this
->getPluginId();
$this->cache
->delete("hash:{$plugin_id}:{$this->hash}");
$this->hasMetadataChangedFromCacheVersion = FALSE;
return TRUE;
}