mirror of
https://github.com/xuthus83/pigallery2.git
synced 2025-01-14 14:43:17 +08:00
improving caching stability
This commit is contained in:
parent
ad7225c62e
commit
99b27a9a55
@ -101,6 +101,7 @@ export class GalleryCacheService {
|
|||||||
if (Config.Client.Other.enableCache === false) {
|
if (Config.Client.Other.enableCache === false) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
try {
|
||||||
const value = localStorage.getItem(GalleryCacheService.CONTENT_PREFIX + Utils.concatUrls(directoryName));
|
const value = localStorage.getItem(GalleryCacheService.CONTENT_PREFIX + Utils.concatUrls(directoryName));
|
||||||
if (value != null) {
|
if (value != null) {
|
||||||
const directory: DirectoryDTO = JSON.parse(value);
|
const directory: DirectoryDTO = JSON.parse(value);
|
||||||
@ -108,6 +109,8 @@ export class GalleryCacheService {
|
|||||||
DirectoryDTO.addReferences(directory);
|
DirectoryDTO.addReferences(directory);
|
||||||
return directory;
|
return directory;
|
||||||
}
|
}
|
||||||
|
} catch (e) {
|
||||||
|
}
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user