Select to view content in your preferred language

Print Widget Caching

1396
8
07-16-2013 01:40 AM
PatrickMcGarry
Occasional Contributor
Has anyone else had an issue with the print widget (using 3.3 codebase) where the widget seems to cache a pdf? Sometimes I would come back to a flexviewer sometimes days later and try to create a new pdf map, and it throws back a map created previously. Furthermore, recently I updated the exportwebmap print service to include a new test template and the changes aren't reflecting in the drop down box, despite the service successfully updating on the server. I have been using my own templates rather than the esri provided ones. They have worked fine since I created the service, but won't update to reflect changes when I overwrite or completely recreate the exportwebmap service.

Has anyone else experienced this?

Any help with this issue would be greatly appreciated.
Tags (2)
0 Kudos
8 Replies
GISDev1
Deactivated User
Has anyone else had an issue with the print widget (using 3.3 codebase) where the widget seems to cache a pdf? Sometimes I would come back to a flexviewer sometimes days later and try to create a new pdf map, and it throws back a map created previously. Furthermore, recently I updated the exportwebmap print service to include a new test template and the changes aren't reflecting in the drop down box, despite the service successfully updating on the server. I have been using my own templates rather than the esri provided ones. They have worked fine since I created the service, but won't update to reflect changes when I overwrite or completely recreate the exportwebmap service.

Has anyone else experienced this?

Any help with this issue would be greatly appreciated.



It sounds to me like you're experiencing two different issues. The bug with a previously generated PDF showing after a new map was created is different than your new MXD template now showing up in your dropdown list.

I do experience the first bug mentioned, and I do not experience any issues updating my MXD template folder.
0 Kudos
BrianOevermann
Frequent Contributor
Patrick,
My users also report issues with pdf caching.  It only happens intermittently for me.  I asked about it at the Flex Viewer island last week at the ESRI UC and the response was, to paraphrase, "sounds like it is holding it in cache" (duh!) but no solution was offered or even brainstormed.  It was an atypical response from what I have come to expect from ESRI employees.

Unfortunately, I didn't have time to get back there in the hopes that another employee might have a better response.

I also do not have any issues updating my custom templates for the ExportWebMap gp task.  I believe the help documents two different methods for creating and storing the templates.  The method I used was to create a folder on my network to store the mxd map layout templates.  This folder is not on my map server but in a folder that is registered with the map server.  I have updated my layouts various times and once saved they are immediately used by the next print request.

BTW, I am still on the 3.0 version, working on getting the 3.3 (well, now 3.4...) version rolled up.  The pdf caching issue has apparently existed since the gp service was first added to the API.

I would love a solution, as I am getting "beat up" by a few users who extensively use the viewer in their workflow.

Brian
0 Kudos
BjornSvensson
Esri Regular Contributor
My users also report issues with pdf caching.  It only happens intermittently for me.


Has anyone else had an issue with the print widget (using 3.3 codebase) where the widget seems to cache a pdf?


I think this is due to a server-side issue with the custom exportwebmap service.  This is fixed in 10.2, but you can also workaround it by changing the service from "sync" to "async".

...I updated the exportwebmap print service to include a new test template and the changes aren't reflecting in the drop down box...

This is due to a server-side issue with an invalid etag for the metadata request for the exportwebmap service which causes the browser to use a browser cache even when it shouldn't.  This has been reported to the server team as a bug. I think it will be fixed for 10.2.1.  You can workaround on your own machine by clearing your browser cache.  Or if you are compiling your own Print Widget, you can set disableClientCaching to true on the PrintTask.

It shouldn't matter which 3.x version of Flex Viewer that you are using.
0 Kudos
PatrickMcGarry
Occasional Contributor
Thanks Bjorn! That has solved the issue!
0 Kudos
KarenFolger
Frequent Contributor
I tried to fix this same issue by going to async.  No dice!  I'm using 10.1 server and also a folder with the mxds registered with server.  My problem is that the list of custom documents that I've since reduced, still shows the old list, even though I've re-started the service and re-saved the Flex page.  So not sure what's happening.  Using the Print widget and the ExportWebMap service.  I also have the cache issue where the old maps shows up.  Weird.
0 Kudos
BrianOevermann
Frequent Contributor
Karen,

Are you using the source code and compiling the widget yourself?  FWIW, I didn't bother with the sync/async and instead set the disableClientCaching "switch" that Bjorn mentions.  After clearing the browser cache my users' problems seem to have gone away regarding this.

I am unsure about why your layout list isn't updating.  I haven't modified my list of layouts in a while, so I don't have much knowledge of the process for comparison.  Maybe try deleting the ExportWebMap service and then republishing it?
0 Kudos
KarenFolger
Frequent Contributor
I am using Flex 3.4 with the service that I created and using the Print Widget, no coding on my own.  So I don't think I can set any caching switches.  I will try deleting and re-publishing the service to clear the template list.
0 Kudos
KarenFolger
Frequent Contributor
I had to completely delete and re-create the print service but it seems to be working now with the async option.
0 Kudos