Flush cache when reset db (#5214)
Now that we have persistent cache for schemas, we want to be able to reset its state when users run the database:reset db otherwise schemas won't be synced with the new DB state. Note: In an upcoming PR, we want to be able to invalidate the cache on a workspace level when we change the metadata schema through twenty version upgrade
This commit is contained in:
@ -63,6 +63,10 @@ export class CacheStorageService {
|
||||
});
|
||||
}
|
||||
|
||||
async flush() {
|
||||
return this.cache.reset();
|
||||
}
|
||||
|
||||
private isRedisCache() {
|
||||
return (this.cache.store as any)?.name === 'redis';
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user