mirror of
https://github.com/getgrav/grav.git
synced 2026-07-08 12:21:53 +02:00
Added MediaTrait::freeMedia() method to free media (and memory)
This commit is contained in:
@@ -1,3 +1,9 @@
|
||||
# v1.7.0-rc.8
|
||||
## mm/dd/2020
|
||||
|
||||
1. [](#bugfix)
|
||||
* Added `MediaTrait::freeMedia()` method to free media (and memory)
|
||||
|
||||
# v1.7.0-rc.7
|
||||
## 03/05/2020
|
||||
|
||||
|
||||
@@ -108,6 +108,11 @@ trait MediaTrait
|
||||
return $this;
|
||||
}
|
||||
|
||||
protected function freeMedia()
|
||||
{
|
||||
$this->media = null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Clear media cache.
|
||||
*/
|
||||
@@ -117,7 +122,7 @@ trait MediaTrait
|
||||
$cacheKey = md5('media' . $this->getCacheKey());
|
||||
$cache->delete($cacheKey);
|
||||
|
||||
$this->media = null;
|
||||
$this->freeMedia();
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user