Right now I have some images being served up from TheMovieDB API, like posters/backdrops, but some of them are really slow to load for our users. I was wondering if it's okay to proxy them through our server, set cache headers both browser and reverse, so that they'll load faster?
Only thing I'm concerned about is whether or not it's a violation of TOS and if anyone cares. Not trying to steal them or anything, just want to have better control over the cache.
¿No encuentras una película o serie? Inicia sesión para crearla:
¿Quieres puntuar o añadir este elemento a una lista?
¿No eres miembro?
Contestado por Travis Bell
el 10 de abril de 2018 a las 13:36
Hi @mattkenefick,
Images are usually only going to be slow if they are images that haven't been requested before (therefore already in our cache), what image types and sizes are you requesting?
Once the item has been created in our cache, it will be as fast as it possibly can be (based on your proximity to an edge). As long as you are using sizes that are returned in the configuration method, everything should be fast and cached by now.
We use Cloudflare (on an enterprise contract) which at this point is one of the best CDN's in the world so it's really going to be as good as pretty much everything out there.
Having said all that, ya, you're free to have a local cache.
Contestado por mattkenefick
el 10 de abril de 2018 a las 13:46
Okay.
I was using posters w300_and_h450_bestv2, but they're also intermingled with another service's posters. Maybe it's the other service that's a bit sluggish and I should ask this question over there.
Thanks for the details though. Good to know what's serving it up.
Contestado por Travis Bell
el 10 de abril de 2018 a las 13:47
Ya, so
w300_and_h450_bestv2
is not a supported size on the API so you are likely one of the only ones creating those assets. As such, if every item is being generated for the first time, it's going to be slow. There's no way around it.Contestado por mattkenefick
el 10 de abril de 2018 a las 13:51
If I were looking for the standard portrait size, what type should I be looking for?
My other posters are 400x570. I see there's a w400 here on tmdb. Is there a better matching size for me, something more popular, or am I best off using "w400" ?
Contestado por Travis Bell
el 10 de abril de 2018 a las 13:56
Everything returned by the configuration method should have a fairly high cache hit ratio.
What images type is this for? Person profiles? If it's person images,
w300_and_h450_bestv2
shouldn't actually be too bad since that is the same size I use here on the website. But keep in mind, I only load the first (highest rated) image at that size. That means that every other image has never been cached at that size before.