Current procedure to serve image is as follows:
- Store image on google cloud storage
- Get blob_key:
google.appengine.ext.blobstore.create_gs_key(filename)
- Get url:
google.appengine.api.images.get_serving_url(blob_key,size=250,secure_url=True)
To remove the image, after retrieving the blob_key:
- Delete serving url:
google.appengine.api.images.delete_serving_url(blob_key)
- Delete google cloud storage file: 'cloudstorage.delete(filename)'
Issue
The issue is that the url is still serving for an undefined amount of time, even though the underlying image does not exist on google cloud storage anymore. Most of the time the url returns 404 in ~24hrs, but have also seen 1 image still serving now (~2wks).
What are the expectations about the promptness of the delete_serving_url
call? Any alternatives to delete the url faster?
x-goog-cache-control
, whereas it neededcache-control
. Nevertheless, when creating the file usingcloudstorage.open(filename, 'w',content_type=mimetype,options={'cache-control':'no-cache'})
, and then going through the procedure described above the url still works after 1hr. Thoughts? – Caryopsis