You are here

function search_api_attachments_file_delete in Search API attachments 7

Same name and namespace in other branches
  1. 8 search_api_attachments.module \search_api_attachments_file_delete()
  2. 9.0.x search_api_attachments.module \search_api_attachments_file_delete()

Implements hook_file_delete().

File

./search_api_attachments.module, line 122
Drupal hooks.

Code

function search_api_attachments_file_delete($file) {

  // If there is cached extracted data for this file, delete it.
  // We don't need it anymore.
  $file = (array) $file;
  $cid = 'cached_extraction_:' . $file['fid'];
  cache_clear_all($cid, 'cache_search_api_attachments');
}