Bust cache with version
parent
f9861f331f
commit
1295c397a2
|
@ -69,6 +69,7 @@ class PageController extends Controller {
|
|||
// Apps enabled
|
||||
$this->initialState->provideInitialState('systemtags', $this->appManager->isEnabledForUser('systemtags') === true);
|
||||
$this->initialState->provideInitialState('recognize', $this->appManager->isEnabledForUser('recognize') === true);
|
||||
$this->initialState->provideInitialState('version', $this->appManager->getAppInfo('memories')["version"]);
|
||||
|
||||
$response = new TemplateResponse($this->appName, 'main');
|
||||
return $response;
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
import { getCanonicalLocale } from "@nextcloud/l10n";
|
||||
import { getCurrentUser } from '@nextcloud/auth'
|
||||
import { loadState } from '@nextcloud/initial-state'
|
||||
import { IPhoto } from "../types";
|
||||
|
||||
// Memoize the result of short date conversions
|
||||
|
@ -166,7 +167,8 @@ export const constants = {
|
|||
|
||||
/** Cache store */
|
||||
let cacheStorage: Cache | null = null;
|
||||
caches.open(`memories-${getCurrentUser()!.uid}`).then((cache) => { cacheStorage = cache });
|
||||
const cacheName = `memories-${loadState('memories', 'version')}-${getCurrentUser()!.uid}`;
|
||||
caches.open(cacheName).then((cache) => { cacheStorage = cache });
|
||||
|
||||
/** Get data from the cache */
|
||||
export async function getCachedData(url: string) {
|
||||
|
|
Loading…
Reference in New Issue