File tree 2 files changed +6
-3
lines changed
profile2/tool/src/java/org/sakaiproject/profile2/tool/components
2 files changed +6
-3
lines changed Original file line number Diff line number Diff line change 20
20
import org .apache .wicket .markup .html .image .resource .BufferedDynamicImageResource ;
21
21
import org .apache .wicket .markup .html .panel .Panel ;
22
22
import org .apache .wicket .model .Model ;
23
+ import org .apache .wicket .request .resource .IResource ;
23
24
import org .apache .wicket .spring .injection .annot .SpringBean ;
24
25
import org .sakaiproject .profile2 .logic .SakaiProxy ;
25
26
import org .sakaiproject .profile2 .util .ProfileConstants ;
@@ -57,8 +58,8 @@ else if (sakaiProxy.getResource(imageResourceId) == null) {
57
58
BufferedDynamicImageResource imageResource = new BufferedDynamicImageResource () {
58
59
59
60
private static final long serialVersionUID = 1L ;
60
-
61
- protected byte [] getImageData () {
61
+ @ Override
62
+ protected byte [] getImageData (IResource . Attributes ignored ) {
62
63
return imageBytes ;
63
64
}
64
65
};
Original file line number Diff line number Diff line change 4
4
import org .apache .wicket .markup .html .WebComponent ;
5
5
import org .apache .wicket .model .IModel ;
6
6
import org .sakaiproject .profile2 .util .ProfileConstants ;
7
+ import java .util .concurrent .TimeUnit ;
7
8
8
9
/**
9
10
* Renders a user's profile image via the direct entity URL.
@@ -57,7 +58,8 @@ protected void onComponentTag(ComponentTag tag) {
57
58
}
58
59
}
59
60
60
- String url = "/direct/profile/" +userUuid + "/image" + sizePart ;
61
+ //Cache for a minute
62
+ String url = "/direct/profile/" +userUuid + "/image" + sizePart + "?t=" + TimeUnit .MILLISECONDS .toMinutes (System .currentTimeMillis ());
61
63
62
64
tag .put ("src" , url );
63
65
}
You can’t perform that action at this time.
0 commit comments