Force re-cache of WSDL in php

前端 未结 4 2120
清酒与你
清酒与你 2021-02-19 01:42

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 me

相关标签:
4条回答
  • 2021-02-19 02:15

    Delete the old WSDL from the cache.

    0 讨论(0)
  • 2021-02-19 02:17

    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.

    0 讨论(0)
  • 2021-02-19 02:24

    I'd try

    $limit = ini_get('soap.wsdl_cache_limit');
    ini_set('soap.wsdl_cache_limit', 0);
    ini_set('soap.wsdl_cache_limit', $limit);
    

    Or possibly set soap.wsdl_cache_ttl to 0 and back

    0 讨论(0)
  • 2021-02-19 02:25

    In my php.ini there's an entry which looks like this:

    soap.wsdl_cache_dir="/tmp"
    

    In /tmp, I found a bunch of files named wsdl-[some hexadecimal string]

    I can flush the cached wsdl files with this command:

    rm /tmp/wsdl-*
    
    0 讨论(0)
提交回复
热议问题