php-tuf / composer-integration

PHP-TUF Composer Plugin.
7 stars 5 forks source link

For better performance, Loader should send If-Modified-Since headers when downloading TUF metadata, and read unmodified data from persistent storage #87

Closed phenaproxima closed 1 year ago

phenaproxima commented 1 year ago

Right now, we have a big performance problem, which is that we always download TUF metadata from the server, even if we already have the most up-to-date version of it in persistent storage. That's real bad.

We need to fix this by sending an If-Modified-Since header with these requests. If the server supports them, it should reply to requests for unchanged metadata with 304 Not Modified, which should be our cue to load the data from persistent storage.