Skip to content

Commit

Permalink
Add a reference to updated time to avoid overcaching associated images.
Browse files Browse the repository at this point in the history
  • Loading branch information
manthey committed Aug 25, 2020
1 parent 7311167 commit dd23d5c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
7 changes: 3 additions & 4 deletions girder/girder_large_image/web_client/templates/itemView.pug
Original file line number Diff line number Diff line change
Expand Up @@ -67,17 +67,16 @@ if Array.isArray(extra.images)
- imageList.push(likey);
else if largeImageMetadata.images.indexOf(ikey) >= 0 && imageList.indexOf(ikey) < 0
- imageList.push(ikey);
- var imageWidth = 400, imageHeight = 400;

if imageList.length
- var imageWidth = 400, imageHeight = 400;
.g-widget-metadata-header.auximage
i.icon-picture
| Associated Images
.g-widget-metadata-container.auximage
for ikey in imageList
- title = ikey.substr(0, 1).toUpperCase() + ikey.substr(1);
a.g-widget-auximage(href=`${imageUrl}${ikey}`, target="_blank", auximage=ikey)
a.g-widget-auximage(href=`${imageUrl}${ikey}?_=${updated}`, target="_blank", auximage=ikey)
.g-widget-auximage-title
| #{title}
.g-widget-auximage-image
img(src=`${imageUrl}${ikey}?width=${imageWidth}&height=${imageHeight}`)
img(src=`${imageUrl}${ikey}?width=${imageWidth}&height=${imageHeight}&_=${updated}`)
1 change: 1 addition & 0 deletions girder/girder_large_image/web_client/views/itemView.js
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ var ItemViewWidget = View.extend({
render: function () {
this.$el.html(itemViewWidget({
extra: this.extra,
updated: this.model.get('updated'),
largeImageMetadata: this.metadata,
yaml: yaml,
imageUrl: `${getApiRoot()}/item/${this.itemId}/tiles/images/`
Expand Down

0 comments on commit dd23d5c

Please sign in to comment.