Add method to clear the media cache

This commit is contained in:
Flavio Copes
2017-01-28 19:09:30 +01:00
parent 3627e0ec59
commit 8ecf367356

View File

@@ -924,6 +924,20 @@ class AdminBaseController
}
}
/**
* Handles clearing the media cache
*
* @return bool True if the action was performed
*/
protected function clearMediaCache()
{
$key = 'media-manager-files';
$cache = $this->grav['cache'];
$cache->delete(md5($key));
return true;
}
/**
* Determine if the user can edit media
*