如何刷新网站缓存? [英] How To Flush A Websites Cache?

查看:247
本文介绍了如何刷新网站缓存?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这个问题专门针对Azure在其门户网站中。



我有一个在Azure WordPress中运行的测试站点;当我尝试查看所做的更新时,看不到它们。即使刷新浏览器的缓存,或在从未访问过的新位置访问该网站,也看不到这些更改。我的下一个尝试是删除wordpress网站上的所有内容,然后重新上传该网站。



根据我的研究,我唯一能想到的是Azure将页面的副本保留在缓存中的某个位置,这需要被冲洗。我尝试重新启动应用程序服务计划,并查看了门户网站,但没有看到在设置中刷新缓存的选项。



仅进行审查:


  1. 我尝试刷新浏览器的缓存。

  2. 我尝试删除所有文件并重新上传。

  3. 我尝试重新启动Azure门户中的应用程序服务计划。

一切仍然显示出旧的设计。 / p>

我可以通过查看外观然后查看编辑器 php页面;网站加载时的页面源完全错误(并且很奇怪,因为该页面不再存在于服务器上的任何位置)。

解决方案

请尝试以下2个选项:




  • WEBSITE_DYNAMIC_CACHE 设置为 0 ,在Azure Web Apps管理门户的应用设置

  • 利用如何:使用自定义PHP运行时修改应用程序根目录中 web.config 中的设置。

    我们可以使用Azure内置PHP运行时而不是上面提到的自定义PHP运行时,请考虑 web.config 中的以下内容:


    <配置>
    < system.webServer>
    < handlers>
    < add name = PHP-FastCGI path = *。php动词= 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>


This question is specific exclusively to Azure, in their portal.

I have a test site that I run in 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. 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. 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.

Everything still shows the old design.

I can verify the new design exists by looking at Appearance then Editor php pages; 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:

  • set WEBSITE_DYNAMIC_CACHE to 0, in App settings in your Azure Web Apps manage portal
  • 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.
    We can use the Azure build-in PHP runtime instead our custom PHP runtime mentioned above, consider the following content in 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>

这篇关于如何刷新网站缓存?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆