File tree Expand file tree Collapse file tree 1 file changed +7
-3
lines changed
src/main/java/org/whispersystems/bithub/controllers Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Original file line number Diff line number Diff line change 3131import javax .ws .rs .GET ;
3232import javax .ws .rs .Path ;
3333import javax .ws .rs .QueryParam ;
34+ import javax .ws .rs .core .CacheControl ;
3435import javax .ws .rs .core .MediaType ;
3536import javax .ws .rs .core .Response ;
3637import java .io .IOException ;
@@ -83,12 +84,15 @@ public RecentTransactionsView getTransactions()
8384 public Response getCurrentCommitPrice (@ QueryParam ("format" ) @ DefaultValue ("png" ) String format )
8485 throws IOException
8586 {
87+ CacheControl cacheControl = new CacheControl ();
88+ cacheControl .setNoCache (true );
89+
8690 if (format .equals ("json" )) {
87- return Response .ok (cachedPaymentStatus .get ().getEntity (), MediaType .APPLICATION_JSON_TYPE ).build ();
91+ return Response .ok (cachedPaymentStatus .get ().getEntity (), MediaType .APPLICATION_JSON_TYPE ).cacheControl ( cacheControl ). build ();
8892 } else if (format .equals ("png_small" )) {
89- return Response .ok (cachedPaymentStatus .get ().getSmallBadge (), "image/png" ).build ();
93+ return Response .ok (cachedPaymentStatus .get ().getSmallBadge (), "image/png" ).cacheControl ( cacheControl ). build ();
9094 } else {
91- return Response .ok (cachedPaymentStatus .get ().getBadge (), "image/png" ).build ();
95+ return Response .ok (cachedPaymentStatus .get ().getBadge (), "image/png" ).cacheControl ( cacheControl ). build ();
9296 }
9397 }
9498
You can’t perform that action at this time.
0 commit comments