Skip to content

Conversation

@djanhjo
Copy link
Contributor

@djanhjo djanhjo commented Oct 15, 2025

Separating out the existing expiry logic in getKeyFromLocalStore to a separate function checkKeyForExpiry. Creating a new function clearExpiredFromLocalStore that evaluates all the keys in local storage, utilizing the same checkKeyForExpiry function.


Note

Introduce clearExpiredFromLocalStore() and refactor expiry checks into checkKeyForExpiry(), invoking cleanup during SDK setup.

  • Utilities (src/utilities/local-storage.js):
    • Extract expiry logic to checkKeyForExpiry(key) and reuse in getKeyFromLocalStore().
    • Add clearExpiredFromLocalStore() to iterate all keys and purge expired/invalid entries.
    • Add error handling with log when parsing/checking entries.
  • Initialization (src/gist.js):
    • Import and call clearExpiredFromLocalStore() during setup() to proactively clean storage.

Written by Cursor Bugbot for commit edd032c. This will update automatically on new commits. Configure here.

@djanhjo djanhjo requested a review from a team as a code owner October 15, 2025 20:45
cursor[bot]

This comment was marked as outdated.

cursor[bot]

This comment was marked as outdated.

@djanhjo djanhjo merged commit 8ce596e into develop Oct 17, 2025
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

3 participants