image - Google App Engine - Busting Serving URL Cache -
i've managed images rotate on app engine, i'm struggling around images being cached , standard cache busting techniques doesn't anything.
so first time rotate image, different url , image rotated.
the second time rotate it, same url back, after appending =s300-c image rotate, third time rotate, need change =s300-c -s301-c in order see new image.
if go =s300-c, previous rotation of image.
appending ?datetimegoeshere doesn't work leaves me believe caching happening on google's side , it's not browser problem.
what can append image serving url in order latest version of image?
i'm using following code write rotated image:
gcsservicefactory.creategcsservice().delete(filename); gcsoutputchannel outputchannel = gcsservicefactory.creategcsservice().createorreplace( filename, gcsfileoptions.getdefaultinstance()); outputchannel.write(bytebuffer.wrap(newimage.getimagedata())); outputchannel.close();
and code generate new serving url:
string newimageurl = imagesservice.getservingurl(servingurloptions.builder.withblobkey(blobkey));
(rest of source code posted here: storing rotated / flipped images in google app engine)
this url example give me 1 version of image: http://lh5.ggpht.com/bbzlugp07djndnkn-ezjo5gu2hstmimwxnrkfj8i9buebpjmdhmoxviwujiis96mpa_2tytubokvy16onwzrt4g0_7q=s505-c
and return version of same image (even though should returning same image, different size): http://lh5.ggpht.com/bbzlugp07djndnkn-ezjo5gu2hstmimwxnrkfj8i9buebpjmdhmoxviwujiis96mpa_2tytubokvy16onwzrt4g0_7q=s504-c
how google app engine serve latest version of image?
while doesn't answer question on cache busting might solve problem.
try these 4 urls
http://lh5.ggpht.com/bbzlugp07djndnkn-ezjo5gu2hstmimwxnrkfj8i9buebpjmdhmoxviwujiis96mpa_2tytubokvy16onwzrt4g0_7q=s0 http://lh5.ggpht.com/bbzlugp07djndnkn-ezjo5gu2hstmimwxnrkfj8i9buebpjmdhmoxviwujiis96mpa_2tytubokvy16onwzrt4g0_7q=s0-r90 http://lh5.ggpht.com/bbzlugp07djndnkn-ezjo5gu2hstmimwxnrkfj8i9buebpjmdhmoxviwujiis96mpa_2tytubokvy16onwzrt4g0_7q=s0-r180 http://lh5.ggpht.com/bbzlugp07djndnkn-ezjo5gu2hstmimwxnrkfj8i9buebpjmdhmoxviwujiis96mpa_2tytubokvy16onwzrt4g0_7q=s0-r270
i.e can rotate images on fly without having manually.
Comments
Post a Comment