diff --git a/classes/adminbasecontroller.php b/classes/adminbasecontroller.php index e52082dc..f6604647 100644 --- a/classes/adminbasecontroller.php +++ b/classes/adminbasecontroller.php @@ -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 *