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

Adds thumbnails-permanent for specific host #27

Open
wants to merge 1 commit into
base: try/run-mshots-from-local-docker-env-local-edit
Choose a base branch
from

Conversation

enejb
Copy link
Member

@enejb enejb commented Oct 28, 2020

I am not sure if this is the right approach here.

The problem that I am trying to solve it make sure that under some domains (that we control such as public-api.wordpress.com) we don't clear the cache and are always able to serve an image.

@simison simison requested a review from a team February 3, 2021 15:00
@lsl
Copy link

lsl commented Feb 5, 2021

I don't know enough about the way this storage / caching works to confidently comment here but I'll do my best to make some educated guesses.

My concern with this particular approach would be that if we ever generate mshots for something on public-api that is dynamic it will never, ever, clear.

For example, this would create problems for something like the design previews if we started adding customers site names to the screenshots.

There is a proposal floating around for re-working mshots to have an option to return the image in realtime - that is don't redirect, make the connection wait for the screenshot to be taken. This would help us avoid needing to poll for images like we do in calypso's MShotsImage component.

Another option would be to implement this to work with a given option only (?permanent=true or ?ttl=86400) But these likely still run into the situation where a server might clear, a new server might be spun up or you simply hit a new server without the image. (mshots is loadbalanced across a few servers iirc)

@bazza
Copy link
Contributor

bazza commented Jun 21, 2021

All local storage is ephemeral, so if you want permanent storage you will need to utilize object storage.

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