Closed crosa7 closed 8 months ago
Not sure why this was closed, but it seems like something worth looking into, thanks.
I had closed this as this could be achieved in another way and I wasn't sure if it was something you would like to have as a responsibility of picsur itself. Thanks for re-opening
Relatedly, an "ETag" header https://en.wikipedia.org/wiki/HTTP_ETag would be useful so clients can ask if the image was modified, and Picsur can send a 304 Not Modified back (or not).
Since the url to an image will always be the same image, there doesn't need to be any check to see if the data has changed. The next release will now by default cache images for a month.
First, thanks a lot for this awesome project, was looking for something like this for a while!
I just setup picsur and I noticed that when I request the image from my website, the image is always loaded from the server instead of only the first time and then the next calls will load them from memory-cache.
I searched a bit and I believe it is due to the missing
Cache-Control
header on the response (I don't have much knowledge on this). Would it be possible to implement this? It would make loading images in a website much more performant, and also avoid calls to the server all the time. Thanks a lot!