-
-
Notifications
You must be signed in to change notification settings - Fork 480
[General] Images offline cache #1732
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. I would love to get rid of placing files directly into electron folder.
I'll check the game image! I thought about using the app name, but then we have 2 different sizes for the main image plus the logo, so I would have to come up with a pattern to generate file names and also I would have to pass the app name and image type around in the url (I guess I could get the requested size from the url), but it sounds like too complicated for something that is just a cache, the digest ensures it's unique and it's really simple |
@flavioislima I fixed the issue with the game image (added a fallback src to use the smaller one if it fails) I couldn't use |
NIce, Looks good now! Ready to merge! 👍🏽 |
This PR adds a mechanism to cache game images in the file system to be overcome the issue with the chrome's cache having a limit in size.
How it works:
imagecache://
intercepted by electron to respond with a local fileimagecache://
url into a local file response and, if the file is not already cached, cache it in the backgroundthis was suprisingly way easier than I expected xD
Use the following Checklist if you have changed something on the Backend or Frontend: