Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add caching to images #2798

Merged
merged 11 commits into from
Mar 17, 2025
Merged

Add caching to images #2798

merged 11 commits into from
Mar 17, 2025

Conversation

ratik21
Copy link
Collaborator

@ratik21 ratik21 commented Mar 17, 2025

What does this do?

  • Puts the downloaded images to a cache (browser cache API + indexedDB), for faster retrieval later.
  • When the user reloads, it will fetch it from cache first, and if found, it will be returned. This should help in better reload times.
  • Also added a cleanUp function to run a clearance script every 2 hours, this will refresh the cache i.e get rid of older entries which haven't been accessed since the last "2 days".

@ratik21 ratik21 requested review from a team and RickyRoller March 17, 2025 07:20
@ratik21 ratik21 force-pushed the indexed-db-images branch from 03bee3d to ccb1e30 Compare March 17, 2025 07:23
@ratik21 ratik21 merged commit 71e74a0 into main Mar 17, 2025
5 checks passed
@ratik21 ratik21 deleted the indexed-db-images branch March 17, 2025 08:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant