We hit this issue when a process were adding lot of images in the same subfolder of the digilib directory requesting the image just after having added it (in our case using a symblink so the process was also faster). When the read occur in the same second than the previous successful read digilib report a wrong 404.
For example having 10 images
at time 0sec we put image 1 in digilib and request a small thumbnail of it
few ms after we put image 2 in digilib, the request to get a thumbnail fails with a 404
at time 1sec we repeat the request and the thumbnail is successful generated
The idea of the patch is to store the read time (truncated to the sec accuracy) instead than the last modified time reported by the filesystem to check future validity of the cache
We hit this issue when a process were adding lot of images in the same subfolder of the digilib directory requesting the image just after having added it (in our case using a symblink so the process was also faster). When the read occur in the same second than the previous successful read digilib report a wrong 404.
For example having 10 images at time 0sec we put image 1 in digilib and request a small thumbnail of it few ms after we put image 2 in digilib, the request to get a thumbnail fails with a 404 at time 1sec we repeat the request and the thumbnail is successful generated
The idea of the patch is to store the read time (truncated to the sec accuracy) instead than the last modified time reported by the filesystem to check future validity of the cache