diff --git a/src/index.ts b/src/index.ts index 8532460d..e5ae1833 100755 --- a/src/index.ts +++ b/src/index.ts @@ -680,6 +680,12 @@ class Storyblok { } } + public clearCacheVersion(): void { + if (this.accessToken) { + cacheVersions[this.accessToken] = 0 + } + } + private cacheProvider(): ICacheProvider { switch (this.cache.type) { case 'memory': @@ -722,6 +728,7 @@ class Storyblok { public async flushCache(): Promise { await this.cacheProvider().flush() + this.clearCacheVersion() return this } }