简体   繁体   English

如何刷新网站缓存?

[英]How To Flush A Websites Cache?

This question is specific exclusively to Azure, in their portal. 这个问题专门针对Azure在其门户中。

I have a test site that I run in Azure wordpress; 我有一个在Azure wordpress中运行的测试站点; when I try to see updates I make, I don't see them. 当我尝试查看所做的更新时,看不到它们。 Even if I flush my browser's cache, or access the site at a new location that's never been to the site, I do not see these changes. 即使刷新浏览器的缓存,或在从未访问过该站点的新位置访问该站点,也看不到这些更改。 My next attempt was to delete everything on the wordpress site, and re-upload the site. 我的下一个尝试是删除wordpress网站上的所有内容,然后重新上传该网站。 This did nothing as well. 这也没有做。

Based on my research, the only thing that I can figure is that Azure is keeping a copy of the pages somewhere in cache and this needs to be flushed. 根据我的研究,我唯一能想到的是Azure将页面的副本保存在缓存中的某个位置,因此需要对其进行刷新。 I tried restarting the app service plan, and looked through the Portal, but never saw an option to flush the cache in settings. 我尝试重新启动应用程序服务计划,并浏览了门户网站,但从未看到过在设置中刷新缓存的选项。

Just a review: 只是一个评论:

  1. I tried flushing the browser's cache. 我尝试刷新浏览器的缓存。
  2. I tried removing all the files and re-uploading. 我尝试删除所有文件并重新上传。
  3. I tried restarting the app service plan in the Azure portal. 我尝试在Azure门户中重新启动应用程序服务计划。

Everything still shows the old design. 一切仍然显示出旧的设计。

I can verify the new design exists by looking at Appearance then Editor php pages; 我可以先查看Appearance然后查看Editor php页面,以验证新设计是否存在; the page source when the site loads is completely wrong (and strange since the page no longer exists anywhere on the server). 网站加载时的页面源是完全错误的(并且很奇怪,因为该页面不再存在于服务器上的任何位置)。

Please try the following 2 options: 请尝试以下2个选项:

  • set WEBSITE_DYNAMIC_CACHE to 0 , in App settings in your Azure Web Apps manage portal 在Azure Web Apps管理门户中的WEBSITE_DYNAMIC_CACHE 应用程序设置''中将WEBSITE_DYNAMIC_CACHE设置为0
  • leverage the hint of How to: Use a custom PHP runtime to modify the setting in web.config in your root directory of your application. 利用“ 如何:使用自定义PHP运行时”来修改应用程序根目录中web.config中的设置。
    We can use the Azure build-in PHP runtime instead our custom PHP runtime mentioned above, consider the following content in web.config : 我们可以使用Azure内置PHP运行时代替上面提到的自定义PHP运行时,请考虑web.config的以下内容:
    <configuration> <system.webServer> <handlers> <add name="PHP-FastCGI" path="*.php" verb="GET,HEAD,POST" modules="FastCgiModule" scriptProcessor="D:\\Program Files (x86)\\PHP\\v5.6\\php-cgi.exe" resourceType="Either" requireAccess="Script" responseBufferLimit="0"/> </handlers> </system.webServer> </configuration>

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

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