Remove value from cache on delete/clear

Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>
This commit is contained in:
Daniel Kesselberg 2018-10-08 16:40:39 +02:00
parent 5cf38254bb
commit 4cbea5f7e1
No known key found for this signature in database
GPG Key ID: 36E3664E099D0614
1 changed files with 2 additions and 0 deletions

View File

@ -98,6 +98,7 @@ class AmazonS3 extends \OC\Files\Storage\Common {
private function clearCache() {
$this->objectCache = new CappedMemoryCache();
$this->filesCache = new CappedMemoryCache();
}
private function invalidateCache($key) {
@ -109,6 +110,7 @@ class AmazonS3 extends \OC\Files\Storage\Common {
unset($this->objectCache[$existingKey]);
}
}
unset($this->filesCache[$key]);
}
/**