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

[FEAT] Caching graph image url for 1 hr #71

Open
wants to merge 2 commits into
base: production
Choose a base branch
from

Conversation

princedalsaniya
Copy link
Member

@princedalsaniya princedalsaniya commented Nov 1, 2024

Description of Changes:

Added URL Caching for Share Functionality:

  • Caches the uploaded image URL in localStorage for 1 hour to reduce redundant API calls.
  • Reuses the cached URL for sharing if the user triggers the share action within the 1-hour window.

Updated handleShareClick Logic:

  • Checks for an existing cached URL before making a new API call to upload the chart image.
  • If the cached URL is expired or unavailable, uploads a new image and updates the cache with the latest URL.

Improved User Experience:

  • Prevents frequent uploads within a short time span and improves efficiency by reducing redundant network requests.

@princedalsaniya princedalsaniya changed the title [FEAT] Added error notification and have limitation on upload graph [FEAT] Caching graph image url for 1 hr Nov 1, 2024
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