Loading...
Important Notice - Forums is archived

To simplify things and help our users to be more productive, we have archived the current forum and focus our efforts on helping developers on Stack Overflow. You can post new questions on Stack Overflow or join our Discord channel.

Product icon
TUTORIAL

Vaadin lets you build secure, UX-first PWAs entirely in Java.
Free ebook & tutorial.

Setting cache time on a ThemeResource

Rick Smith
1 decade ago Feb 22, 2010 3:28pm

My application is currently suffering at a result of icons set as Embedded object being reloaded instead of cached on the browser.

The Vaadin book give an example but this is loading in image from soem arbirtaty location (which would mean I have to use FileInputStream with exception handling), in my case I need to load the image file depending on which Theme is currently in use. The ThemeResource object does not have a method to set the caching time.

I expect this would be a problem on any other application using Theme Resources, why isn't there a way to set cache time on those, perhaps it isnt possible for some other reason?

Can somebody explain how any kind of Theme resouce cahing curretly occurrs or any suggested way to prevent ThemeResources from being reloaded by the browser?

Antti Koski
1 decade ago Feb 26, 2010 8:19am
Jouni Koivuviita
1 decade ago Feb 26, 2010 9:04am
Stéphane Nicoll
1 decade ago Aug 29, 2011 6:42am