Clear settings caches on reset rather than custom lifecycle method (#12859)
* Clear settings caches on reset Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> * Derp Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> * Delint Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> --------- Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
This commit is contained in:
parent
090586439f
commit
54e5321f39
2 changed files with 5 additions and 4 deletions
|
@ -35,8 +35,7 @@ export default abstract class AbstractLocalStorageSettingsHandler extends Settin
|
|||
}
|
||||
};
|
||||
|
||||
// Expose the clear event for Lifecycle to call, the storage listener only fires for changes from other tabs
|
||||
public static clear(): void {
|
||||
private static clear(): void {
|
||||
AbstractLocalStorageSettingsHandler.itemCache.clear();
|
||||
AbstractLocalStorageSettingsHandler.objectCache.clear();
|
||||
}
|
||||
|
@ -108,4 +107,8 @@ export default abstract class AbstractLocalStorageSettingsHandler extends Settin
|
|||
public isSupported(): boolean {
|
||||
return localStorage !== undefined && localStorage !== null;
|
||||
}
|
||||
|
||||
public reset(): void {
|
||||
AbstractLocalStorageSettingsHandler.clear();
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue