mirror of
https://github.com/appwrite/appwrite
synced 2026-05-24 01:18:37 +00:00
updates
This commit is contained in:
parent
f3315c69a0
commit
f86bf6fdfd
1 changed files with 4 additions and 7 deletions
|
|
@ -754,13 +754,10 @@ App::shutdown()
|
||||||
Authorization::skip(fn () => $dbForProject->updateDocument('cache', $cacheLog->getId(), $cacheLog));
|
Authorization::skip(fn () => $dbForProject->updateDocument('cache', $cacheLog->getId(), $cacheLog));
|
||||||
}
|
}
|
||||||
|
|
||||||
$cache = new Cache(
|
if ($signature !== $cacheLog->getAttribute('signature')) {
|
||||||
new Filesystem(APP_STORAGE_CACHE . DIRECTORY_SEPARATOR . 'app-' . $project->getId())
|
$cache = new Cache(
|
||||||
);
|
new Filesystem(APP_STORAGE_CACHE . DIRECTORY_SEPARATOR . 'app-' . $project->getId())
|
||||||
|
);
|
||||||
$timestamp = 60 * 60 * 24 * 30;
|
|
||||||
$cacheFile = $cache->load($key, $timestamp);
|
|
||||||
if ($signature !== $cacheLog->getAttribute('signature') || empty($cacheFile)) {
|
|
||||||
$cache->save($key, $data['payload']);
|
$cache->save($key, $data['payload']);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue