Hello,
when I open a PDF from a URL (SDK or standalone) the PDF seems to always load from the internet/network again, although there seems to be a file in the cache (e.g. fct6AA.tmp) that contains exactly the PDF I need. Instead a new tmp-file with the same content is created.
Is there any way to to make the cache take effect when opening PDF documents from a URL?
Regards,
Andreas
Caching when opening PDF from URL
Moderators: PDF-XChange Support, Daniel - PDF-XChange, Chris - PDF-XChange, Sean - PDF-XChange, Paul - PDF-XChange, Vasyl - PDF-XChange, Ivan - Tracker Software, Stefan - PDF-XChange
Forum rules
DO NOT post your license/serial key, or your activation code - these forums, and all posts within, are public and we will be forced to immediately deactivate your license.
When experiencing some errors, use the IAUX_Inst::FormatHRESULT method to see their description and include it in your post along with the error code.
DO NOT post your license/serial key, or your activation code - these forums, and all posts within, are public and we will be forced to immediately deactivate your license.
When experiencing some errors, use the IAUX_Inst::FormatHRESULT method to see their description and include it in your post along with the error code.
-
- Site Admin
- Posts: 19913
- Joined: Mon Jan 12, 2009 8:07 am
Re: Caching when opening PDF from URL
Hello AnKeilha,
It might not be possible for the Editor to recognize whether there have been any changes to the file from the URL and that is why it is downloading it each time. I will ask our devs if there is any way this can be improved, but I can not make any promises at this point!
Kind regards,
Stefan
It might not be possible for the Editor to recognize whether there have been any changes to the file from the URL and that is why it is downloading it each time. I will ask our devs if there is any way this can be improved, but I can not make any promises at this point!
Kind regards,
Stefan
-
- User
- Posts: 76
- Joined: Fri Apr 27, 2018 11:17 am
Re: Caching when opening PDF from URL
Hello Stefan,
thanks for the quick reply. I realize that it will be pretty much impossible to recognize, in general, if the remote resource has actually changed. For my use case, if the URL is unchanged, the content is also unchanged, because I am accessing a content manager of a document management system via HTTP.
I realise that I could just download the content and do some file based caching on the client side, but then I would lose the advantage of opening documents via URL directly.
Regards,
Andreas
thanks for the quick reply. I realize that it will be pretty much impossible to recognize, in general, if the remote resource has actually changed. For my use case, if the URL is unchanged, the content is also unchanged, because I am accessing a content manager of a document management system via HTTP.
I realise that I could just download the content and do some file based caching on the client side, but then I would lose the advantage of opening documents via URL directly.
Regards,
Andreas
-
- Site Admin
- Posts: 19913
- Joined: Mon Jan 12, 2009 8:07 am
-
- User
- Posts: 76
- Joined: Fri Apr 27, 2018 11:17 am
Re: Caching when opening PDF from URL
Hello again,
I would like to make a concrete suggestion as to how the SDK could be extended to fulfil the use case I have described:
There could be a new flag in OpenFileFlags (something like AFS_OpenFile_CacheUrl) that causes the cache to be used if the same URL was already loaded before. Would that be feasible?
Regards,
Andreas
I would like to make a concrete suggestion as to how the SDK could be extended to fulfil the use case I have described:
There could be a new flag in OpenFileFlags (something like AFS_OpenFile_CacheUrl) that causes the cache to be used if the same URL was already loaded before. Would that be feasible?
Regards,
Andreas
-
- User
- Posts: 76
- Joined: Fri Apr 27, 2018 11:17 am
Re: Caching when opening PDF from URL
Hello again,
just one point I would like to clarify: Is there any actual benefit when opening a file via URL, i.e. does PDFXChange stream the data and display content before the whole of the document is loaded? Or does it just download the file to the temp directory and load it from there?
Regards
Andreas
just one point I would like to clarify: Is there any actual benefit when opening a file via URL, i.e. does PDFXChange stream the data and display content before the whole of the document is loaded? Or does it just download the file to the temp directory and load it from there?
Regards
Andreas
-
- User
- Posts: 76
- Joined: Fri Apr 27, 2018 11:17 am
Re: Caching when opening PDF from URL
Hello,
I just discovered viewtopic.php?t=21018 . Is it still the case that you are not supporting Linearized PDFs and Fast Web View?
If this is indeed the case, the advantage of loading directly from URL would be non existent. Can you confirm?
Regards
Andreas
I just discovered viewtopic.php?t=21018 . Is it still the case that you are not supporting Linearized PDFs and Fast Web View?
If this is indeed the case, the advantage of loading directly from URL would be non existent. Can you confirm?
Regards
Andreas