function _search_api_attachments_delete_cache in Search API attachments 8
Same name and namespace in other branches
- 9.0.x search_api_attachments.module \_search_api_attachments_delete_cache()
Helper function to delete a file extracted data cache.
Parameters
\Drupal\file\Entity\File $file: The file object.
2 calls to _search_api_attachments_delete_cache()
- search_api_attachments_file_delete in ./
search_api_attachments.module - Implements hook_ENTITY_TYPE_delete().
- search_api_attachments_file_update in ./
search_api_attachments.module - Implements hook_ENTITY_TYPE_update().
File
- ./
search_api_attachments.module, line 43 - Implement hooks and help functions to delete extracted files cache content.
Code
function _search_api_attachments_delete_cache(File $file) {
$collection = 'search_api_attachments';
$key = $collection . ':' . $file
->id();
\Drupal::keyValue($collection)
->delete($key);
}