Does Vaadin cache any responses, like from StreamResource.setCacheTime()?

I am running Vaadin 7.1.13 and I’m trying to track down some memory issues that seem to crop up if I repeatedly download files and such using FileDownloader and BrowserWindowOpener in which we use a StreamResource and call setCacheTime() on it.

The javadocs for setCacheTime() seem to indicate that the adapter may possibly cache streams sent to the client.

Does that ever happen?

What I’ve noticed, for example with a BrowserWindowOpener, the handleConnectorRequest(), getResource() and eventually my stream’s getStream() are all called as expected on the first click. But if I click again before the setCacheTime() expires, the window will open, but it’s as if my code is not serving the contents again. It’s not clear to me from the Google Chrome Developer tools network screen how this is actually working in terms of requests and responses as I only seem to see the UIDL requests and not the one that returns the contents for the browser window that was opened.

So my question is the Vaadin connector/components somehow caching the response, or is it relying on the browser’s own cache to redisplay it?

EDIT: Should add that I only see HTTP status codes of 200 in the network view of the browser developer tools, not 304s or what I might expect if the response was telling them they can use a browser cached version, but then I never really see the glass “GET” request to download the content in the browser window as it seems to be using the Vaadin UIDL JSON calls.

Hi, you should see a regular GET request downloading the resource. The DownloadStream javadoc should be rewritten now that there’s no longer even the concept of a “terminal”, but the setCacheTime() method simply calls the setCacheTime method of the HTTP response, setting various relevant cache headers. Vaadin does not do any server-side caching by default. It seems that browsers mostly ignore cache headers in case of downloads, though (responses with a Content-Disposition: attachment header).

Yes, I do see the GET requests in the Tomcat access log, but for whatever reason, not in my chrome network view. I suspect it’s because I’m currently testing BrowserWindowOpener and so the GET is taking place in that window instead and chrome’s dev tool doesn’t include it.

That’s good about the fact that nothing is cached. But it begs the issue of why when I do lots of downloads in a row, I can run out of memory. It’s as if the GC is not running often enough as the downloads are serialized when I’m testing. I’ll investigate more today.

I guess, this quesion is very hard. :frowning:

Hey guys !

I am also facing same problem ,while writing the code and putting the " * " symbol in Gridlayout .Here is issue details :

  1. " * " coming at right side of text field.

NOTE : Expect to come at left side…

with regards,
vaadin fever ,
13556.jpg