You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
We are processing PDF files, converting them to images before serving them through the SIH.
This process usually takes a few seconds and in rare cases a user can request an image that has not yet been processed and therefore does not exist. Here we return a default image through the DEFAULT_FALLBACK_IMAGE functionality which works well.
The problem is that the image is available a few seconds after the user originally requested it. If the user requests the image again, after it is available, the 404 response that he got the first time is cached. This seems to be because the cache control header is hardcoded to max-age=31536000.
Describe the feature you'd like
The DEFAULT_FALLBACK_IMAGE should respect the Cache-Control headers set on the fallback image instead of being hardcoded to max-age=31536000. I can see that this is the case when serving images that do not fallback as seen here.
I think that a similar implementation would solve the problem
The text was updated successfully, but these errors were encountered:
@simonkrol I went ahead and created a tiny PR to fix this issue. Hopefully this will be helpful to resolve the issue, since this enhancement is important to us.
Is your feature request related to a problem? Please describe.
We are processing PDF files, converting them to images before serving them through the SIH.
This process usually takes a few seconds and in rare cases a user can request an image that has not yet been processed and therefore does not exist. Here we return a default image through the
DEFAULT_FALLBACK_IMAGE
functionality which works well.The problem is that the image is available a few seconds after the user originally requested it. If the user requests the image again, after it is available, the 404 response that he got the first time is cached. This seems to be because the cache control header is hardcoded to
max-age=31536000
.Describe the feature you'd like
The
DEFAULT_FALLBACK_IMAGE
should respect the Cache-Control headers set on the fallback image instead of being hardcoded tomax-age=31536000
. I can see that this is the case when serving images that do not fallback as seen here.I think that a similar implementation would solve the problem
The text was updated successfully, but these errors were encountered: