NetTalk Central

Author Topic: Cache interfering with report print pdf display.  (Read 4441 times)

terryd

  • Hero Member
  • *****
  • Posts: 759
    • View Profile
    • Davcomm
    • Email
Cache interfering with report print pdf display.
« 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?
 
« Last Edit: December 02, 2016, 08:10:38 PM by terryd »
Terry Davidson
Windows 10 64 bit/Windows7 64bit
Clarion 9.1.11529/Clarion10 12567
Nettalk 913
Nettalk 1015
StringTheory267/Winevent515/XFiles298/MessageBox239/Cryptonite186

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11244
    • View Profile
Re: Cache interfering with report print pdf display.
« Reply #1 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

terryd

  • Hero Member
  • *****
  • Posts: 759
    • View Profile
    • Davcomm
    • Email
Re: Cache interfering with report print pdf display.
« Reply #2 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
Terry Davidson
Windows 10 64 bit/Windows7 64bit
Clarion 9.1.11529/Clarion10 12567
Nettalk 913
Nettalk 1015
StringTheory267/Winevent515/XFiles298/MessageBox239/Cryptonite186

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11244
    • View Profile
Re: Cache interfering with report print pdf display.
« Reply #3 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

terryd

  • Hero Member
  • *****
  • Posts: 759
    • View Profile
    • Davcomm
    • Email
Re: Cache interfering with report print pdf display.
« Reply #4 on: December 13, 2016, 08:49:26 AM »
Thanks Bruce
Terry Davidson
Windows 10 64 bit/Windows7 64bit
Clarion 9.1.11529/Clarion10 12567
Nettalk 913
Nettalk 1015
StringTheory267/Winevent515/XFiles298/MessageBox239/Cryptonite186