mirror of
https://github.com/getgrav/grav-plugin-admin.git
synced 2026-05-06 10:16:37 +02:00
Add method to clear the media cache
This commit is contained in:
@@ -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
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user