Google Storage Image Cache

Using the GoogleStorageTools class CloudStorageTools::getImageServingUrl

and then replacing the image storage object with another image with the same name, the old image is still displayed after subsequent callsgetImageServingUrl

I tried to use CloudStorageTools::deleteImageServingUrl

and then CloudStorageTools::getImageServingUrl

again, but it doesn't work.

Is there a way to interact with cloud storage and tell it to update the image or image url? I assume not, and am going to ensure that the filenames are unique, but it looks like there should be a way.

+3


source to share


1 answer


If you refresh the image, will the new image appear? The image may have a cache control policy set. Google Cloud Storage allows users to specify which cache control headers should be sent to the browser, but I'm not sure if the engine getImageServingUrl application supports this value.



As an experiment, you can try going to console.developers.google.com by going to "storage" cloud storage> storage browser ", selecting the appropriate object, choosing" edit metadata "and then see if there is a Caching Policy on the object? change the cache management section to "max-age = 0, no-cache".

+1


source







All Articles