|
|
@@ -4,19 +4,16 @@ const LSX_STATE_CACHE_NS = 'lsx-state-cache';
|
|
|
|
|
|
|
|
|
let _instance;
|
|
|
-export class TagCacheManagerFactory {
|
|
|
|
|
|
- static getInstance() {
|
|
|
- if (_instance == null) {
|
|
|
- // create generateCacheKey implementation
|
|
|
- const generateCacheKey = (lsxContext) => {
|
|
|
- return `${lsxContext.fromPagePath}__${lsxContext.args}`;
|
|
|
- };
|
|
|
+export function getInstance(): TagCacheManager {
|
|
|
+ if (_instance == null) {
|
|
|
+ // create generateCacheKey implementation
|
|
|
+ const generateCacheKey = (lsxContext) => {
|
|
|
+ return `${lsxContext.fromPagePath}__${lsxContext.args}`;
|
|
|
+ };
|
|
|
|
|
|
- _instance = new TagCacheManager(LSX_STATE_CACHE_NS, generateCacheKey);
|
|
|
- }
|
|
|
-
|
|
|
- return _instance;
|
|
|
+ _instance = new TagCacheManager(LSX_STATE_CACHE_NS, generateCacheKey);
|
|
|
}
|
|
|
|
|
|
+ return _instance;
|
|
|
}
|