简体   繁体   English

如何刷新PDF.js Viewer的缓存?

[英]How to refresh the cache of PDF.js Viewer?

I've got a problem with our PDF.js Viewer plugin (pdfjs-viewer). 我的PDF.js查看器插件(pdfjs-viewer)有问题。

We have a PDF which needs to be displayed with the plugin, so far no problem. 我们有一个需要与插件一起显示的PDF,到目前为止没有问题。 If we now replace the PDF with a new one --- it's a menu so it changes every week --- it still displays the old one. 如果我们现在用一个新的PDF替换它---这是一个菜单,所以它每周都会更改---它仍然显示旧的。 Even if we just delete the PDF on the site with the plugin you can't see any difference: the PDF is still there. 即使我们只是使用插件在网站上删除了PDF,也看不出任何区别:PDF仍然存在。

Do you have any suggestions to solve this problem? 您对解决这个问题有什么建议吗?

We implemented the plugin like this: 我们实现了如下插件:

[pdfjs-viewer url=path/to/menue/menue.pdf viewer_width=1100px viewer_height=1000px fullscreen=true download=true print=true openfile=true]

We are using PDF.js Viewer Version 1.2. 我们正在使用PDF.js Viewer 1.2版。

PDF.js Viewer does not cache any PDF files. PDF.js Viewer不会缓存任何PDF文件。 However your hosting environment might, see http://codex.wordpress.org/I_Make_Changes_and_Nothing_Happens#Server-side_Caching : 但是,您的托管环境可能会看到http://codex.wordpress.org/I_Make_Changes_and_Nothing_Happens#Server-side_Caching

"This situation may also occur if you are using a Managed WordPress hosting plan. Many Managed WordPress hosting plans use server-side caching. If you are using a Managed WordPress service from your hosting provider and you are seeing this issue, you may want to see if they have an option to manually flush the cache. In many cases, your changes will immediately show up after flushing the cache." “如果您使用托管的WordPress托管计划,也会出现这种情况。许多托管的WordPress托管计划都使用服务器端缓存。如果您使用托管提供商的托管WordPress服务,并且看到此问题,则可能需要看看他们是否有手动刷新缓存的选项。在许多情况下,刷新刷新后,您的更改将立即显示。”

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM