NetTalk Central

NetTalk Web Server => Web Server - Ask For Help => Topic started by: terryd on December 02, 2016, 07:43:14 PM

Title: Cache interfering with report print pdf display.
Post by: terryd on December 02, 2016, 07:43:14 PM
I have a browse with an inline other button which prints a pdf report (using pdf tools).Its job is to print all the detail in a file.
I nominate a file name and the pdf file is created in a folder under web.In this instance
The report prints fine and displays in the web pdf viewer correctly. If, however, I change some information in the file and reprint, the pdf file displayed in the viewer is the previous pdf file, not the version that has been recreated in the web folder. It is obviously a situation where the cache has not been cleared.
If I shut down and restart and reprint I get the correct pdf in the viewer.
In the performance tab of the Nettalk webserver extension there are 3 fields that should solve my problem Enable File cache, cache files less than and Max cache size.
Under most situations I prefer cache on since I understand that it improves speed. In this instance, but not always the created pdf file is +-26Kb in size so since currently Cache files less than is set to 1000000 this is the reason why the file is cached.
So my questions.
will setting the Cache files less than to 1000 affect performance significantly?
Is there a method that will let me clear the cache only for the pdf file I am regenerating?
Should I uncheck the Enable file Cache, and will that have a performance impact?
 
Title: Re: Cache interfering with report print pdf display.
Post by: Bruce on December 12, 2016, 02:23:21 AM
First test Terry - since this is refering to Server-side cache, not client side cache, is to test if this is the root of the problem.

Perhaps try turning off the cache, then test again, to see if this is the cause?

cheers
Bruce
Title: Re: Cache interfering with report print pdf display.
Post by: terryd on December 12, 2016, 04:10:32 AM
Hi Bruce Yes.
Turning off the caching then displyed the new dtata each time it was printed. Setting the cache on stored and displayed the first report information
Title: Re: Cache interfering with report print pdf display.
Post by: Bruce on December 12, 2016, 07:04:57 AM
ok, cool.

>> Is there a method that will let me clear the cache only for the pdf file I am regenerating?

no, unfortunately not.
You could clear the _whole_ cache though,
p_web.RequestData.WebServer.ServerMemory.FreeCached()
But personally I would not go this route.

>> Should I uncheck the Enable file Cache,

yes.

>>  and will that have a performance impact?

maybe, but I doubt it will be significant - almost certainly not noticeable.

cheers
Bruce
Title: Re: Cache interfering with report print pdf display.
Post by: terryd on December 13, 2016, 08:49:26 AM
Thanks Bruce