Skip to content

feat: image cacheKey#140

Open
jbrodriguez-bytelion wants to merge 2 commits into
wcandillon:masterfrom
jbrodriguez-bytelion:feat/cache-key
Open

feat: image cacheKey#140
jbrodriguez-bytelion wants to merge 2 commits into
wcandillon:masterfrom
jbrodriguez-bytelion:feat/cache-key

Conversation

@jbrodriguez-bytelion

Copy link
Copy Markdown

Since we need this feature, I've rebased the original PR for upstream inclusion

Add an option to use a cache key that is different from the image
URI. This is useful for example if the image URI contains a parameter
that changes, but the image doesn't vary as a result, such as an
authentication token.

If the cache key is not present, the image URI will be used as the
cache key.
Create a single promise to handle the downloading of a cache
entry. Otherwise, multiple calls to get the path of a new cache
entry will result in multiple downloads, until one of the downloads
is successful.

If the download is unsuccesful, unset the promise so that the
next request will result in a new attempt to download the image.
@jbrodriguez-bytelion jbrodriguez-bytelion changed the title Feat/cache key feat: image cacheKey Dec 27, 2019
@nachozullo

Copy link
Copy Markdown

Hey @wcandillon! There is any chance of getting this merged soon? I need a key because my image uri is not static :(

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.

3 participants