function search_api_attachments_cache_flush in Search API attachments 8
Same name and namespace in other branches
- 9.0.x search_api_attachments.module \search_api_attachments_cache_flush()
Implements hook_cache_flush().
File
- ./
search_api_attachments.module, line 28 - Implement hooks and help functions to delete extracted files cache content.
Code
function search_api_attachments_cache_flush() {
$config = \Drupal::config('search_api_attachments.admin_config');
$preserve_cache = $config
->get('preserve_cache');
if (!$preserve_cache) {
$collection = 'search_api_attachments';
\Drupal::keyValue($collection)
->deleteAll();
}
}