简体   繁体   English

Symfony2项目-缓存一直存在吗?

[英]Symfony2 project - a cache is allways there?

I have a symfony2 project and the live website is synchronized with a lot of delays with the real database. 我有一个symfony2项目,实时网站与实际数据库的同步导致很多延迟。 Event if trying to put a var_dump with an exit in the app.php file in the web directory, the the code is not triggered. 如果尝试在Web目录的app.php文件中放置带有退出的var_dump,则事件不会触发代码。

Any idea where can be the cache? 知道缓存在哪里吗?

app/console cache:clear only clears the caches registered as CacheClearer/CacheWarmer. app/console cache:clear仅清除注册为CacheClearer / CacheWarmer的缓存。

Therefore, it may be that there are still additional caches. 因此,可能仍然有其他缓存。 Try for example restarting services like Memcached or your Webserver (or PHP-FPM, if you're using that), so APC gets refreshed. 例如,尝试重启诸如Memcached或Web服务器(或PHP-FPM,如果使用的话)之类的服务,以便刷新APC。

If you're using Nginx, you might have set it up as reverse proxy. 如果您使用的是Nginx,则可能已将其设置为反向代理。 Check if there's something like http://nginx.com/resources/admin-guide/reverse-proxy/ in your Nginx config. 检查Nginx配置中是否存在类似http://nginx.com/resources/admin-guide/reverse-proxy/的内容

Another possible reason is client-side caching. 另一个可能的原因是客户端缓存。 Try reloading the page with a forced refresh (Ctrl+Shift+R in Firefox). 尝试通过强制刷新(在Firefox中为Ctrl + Shift + R)重新加载页面。 Or, there's a reverse proxy somewhere between you and your server. 或者,您和您的服务器之间存在反向代理。 Sometimes, IPS install transparent reverse proxies to save bandwidth. 有时,IPS安装透明的反向代理以节省带宽。

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

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