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

fix(perf): cache media storage url #3917

Merged
merged 3 commits into from Apr 8, 2020
Merged

fix(perf): cache media storage url #3917

merged 3 commits into from Apr 8, 2020

Conversation

tuxpiper
Copy link
Member

@tuxpiper tuxpiper commented Apr 7, 2020

This pull request makes the following changes:

  • cache media files URL resolution , which can be an expensive operation when cloud storage is involved

Test checklist:

  • verify several times that photos are available in posts

  • I certify that I ran my checklist

Fixes ushahidi/platform# .

Ping @ushahidi/platform

@coveralls
Copy link

coveralls commented Apr 7, 2020

Coverage Status

Coverage decreased (-0.01%) to 20.298% when pulling 47fa15c on media-formatter-cache into 37605ed on develop.

@tuxpiper tuxpiper requested a review from rowasc April 7, 2020 17:46
Copy link
Contributor

@rowasc rowasc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks sane. Let's get this tested.
Nitpick for future PRs is to maybe go with double quotes rather than single for string interpolation
"Ushahidi\App\Formatter\Media.publicUrl[$path]" when possible, which I find generally more readable but you can argue you find this more legible so it's a matter of preference to discuss, I guess

@rowasc rowasc merged commit e28c917 into develop Apr 8, 2020
@rowasc
Copy link
Contributor

rowasc commented Apr 10, 2020

@Obadha2 can we have this tested today?
Thanks!
cc @tuxpiper

@rowasc
Copy link
Contributor

rowasc commented Apr 10, 2020

Tried this in steve, it looks great 🎉

@tuxpiper tuxpiper deleted the media-formatter-cache branch March 24, 2021 20:39
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.

None yet

3 participants