Skip to content

Commit

Permalink
fix: store in expiration in cache
Browse files Browse the repository at this point in the history
  • Loading branch information
Ansonhkg committed Apr 25, 2024
1 parent 7fd720b commit 4b1bdae
Showing 1 changed file with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -407,6 +407,12 @@ export class LitNodeClientNodeJs
localStorage.setItem(storageKey, JSON.stringify(newSessionKey));
} catch (e) {
console.warn(`Localstorage not available. Not a problem. Contiune...`);

// Store in cache
sessionKeyCache = {
value: newSessionKey,
timestamp: expirationInMs,
};
}

return newSessionKey;
Expand Down

0 comments on commit 4b1bdae

Please sign in to comment.