mirror of
https://github.com/bpatrik/pigallery2.git
synced 2024-12-25 02:04:15 +02:00
improving caching stability
This commit is contained in:
parent
ad7225c62e
commit
99b27a9a55
@ -101,12 +101,15 @@ export class GalleryCacheService {
|
||||
if (Config.Client.Other.enableCache === false) {
|
||||
return null;
|
||||
}
|
||||
const value = localStorage.getItem(GalleryCacheService.CONTENT_PREFIX + Utils.concatUrls(directoryName));
|
||||
if (value != null) {
|
||||
const directory: DirectoryDTO = JSON.parse(value);
|
||||
try {
|
||||
const value = localStorage.getItem(GalleryCacheService.CONTENT_PREFIX + Utils.concatUrls(directoryName));
|
||||
if (value != null) {
|
||||
const directory: DirectoryDTO = JSON.parse(value);
|
||||
|
||||
DirectoryDTO.addReferences(directory);
|
||||
return directory;
|
||||
DirectoryDTO.addReferences(directory);
|
||||
return directory;
|
||||
}
|
||||
} catch (e) {
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user