Thanks for the pointers, Brian. I imagine this affects the HTTP caching headers and can't be too aggressive in terms of duration, otherwise if someone updates the metadata for a file, it won't be reflected in media viewer until the max age is reached, right?

I was hoping for a silver bullet that would allow us to not only cache API responses, but also invalidate that cache when someone updates a file's information, but maybe it's not possible with our architecture. The main thing I want to check with Ops is whether squid is affected by the HTTP caching headers for API calls, to make sure that the caching benefit is effective across users, not just for someone who would re-request the same image across pageloads.


On Wed, Apr 9, 2014 at 5:27 PM, Brian Wolff <bawolff@gmail.com> wrote:


On Apr 9, 2014 12:16 PM, "Gilles Dubuc" <gilles@wikimedia.org> wrote:
>
> Another secondary thing we can improve (and which we've mentioned in passing during previous meetings) is to cache the results of our API requests across users, presumably at the squid level. I've emailed Ops to see what can be done in that area.

Api has support for doing this already. See smaxage url parameter and getCacheMode method.

--bawolff


_______________________________________________
Multimedia mailing list
Multimedia@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/multimedia