WordPress.org

Making WordPress.org

Opened 3 years ago

Last modified 7 months ago

#1116 assigned enhancement

Site Cloner: Prime mShots cache

Reported by: iandunn Owned by:
Milestone: Priority: normal
Component: WordCamp Site & Plugins Keywords: needs-patch
Cc:

Description (last modified by iandunn)

The plugin uses the mShots service to generate the site screenshots, but those are built asynchronously when the first request is received, and then retained for 21 days.

If the image isn't requested at least once every 21 days, it will be deleted. If that happens, users will see the default Generating screenshot... image instead of the actual screenshot when they first load the Cloner. To avoid that, we should have a network-wide cron job that makes non-blocking HTTP requests for each of the images every 20 days, so that they're always available when a user needs them.

It should sleep for ~2000 milliseconds between each request to be polite, or maybe process them in small batches.

Change History (6)

#1 @iandunn
3 years ago

  • Description modified (diff)

#2 @iandunn
3 years ago

  • Description modified (diff)

#3 @iandunn
3 years ago

  • Description modified (diff)

#4 @iandunn
2 years ago

  • Owner set to iandunn
  • Status changed from new to accepted

#5 @iandunn
16 months ago

If priming the cache doesn't work out for some reason, then an alternative idea would be to re-download the image after a small wait. We'd need a way to detect when mShots is serving a "previewing..." image, though, and that'd be worse UX than just having the proper image to begin with.

#6 @iandunn
7 months ago

  • Owner iandunn deleted
  • Status changed from accepted to assigned
Note: See TracTickets for help on using tickets.