在PHP中强制重新缓存WSDL [英] Force re-cache of WSDL in php

查看:64
本文介绍了在PHP中强制重新缓存WSDL的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我知道如何禁用 WSDL缓存在PHP中,但是如何强制重新缓存WSDL?



这是我尝试的方法:我在将缓存设置为禁用的情况下运行我的代码,并且新方法如期出现。然后,我激活了缓存,但是由于某种原因,我旧的无法使用的wsdl再次出现。因此:我该如何强制新的WSDL覆盖旧的缓存?写入缓存。因此,当您重新启用缓存时,旧的缓存副本仍将在那里并且有效。您可以尝试(启用缓存)

  ini_set('soap.wsdl_cache_ttl',1); 

我花了1秒钟的生存时间,因为我想如果您将零它将完全禁用缓存,但不会删除该条目。您可能只想在要终止缓存的副本时插入该行。


I know how to disable WSDL-cache in PHP, but what about force a re-caching of the WSDL?

This is what i tried: I run my code with caching set to disabled, and the new methods showed up as espected. Then I activated caching, but of some reason my old non-working wsdl showed up again. So: how can I force my new WSDL to overwrite my old cache?

解决方案

I guess when you disable caching it will also stop writing to the cache. So when you re-enable the cache the old cached copy will still be there and valid. You could try (with caching enabled)

ini_set('soap.wsdl_cache_ttl', 1);

I put in a time-to-live of one second in because I think if you put zero in it will disable the cache entirely but not remove the entry. You probably will only want to put that line in when you want to kill the cached copy.

这篇关于在PHP中强制重新缓存WSDL的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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