Jump to content

simplexml_load_file cache?


Recommended Posts

Ok here's my problem.

 

I use simplexml_load_file to load the following xml file:

http://xboxapi.duncanmackenzie.net/gamertag.ashx?GamerTag=cerebal%20asassin

 

The file is dynamic and constantly changing and for my purpose I use simple_xml quite frequently. Now when it loads and pulls the data, on the following run it will still pull the same data even though the file has changed and can be noted in a web browser that it has. Is there any way to avoid simple_xml from caching the loaded file?

 

EDITED: mispelled the function, woops :)

Link to comment
https://forums.phpfreaks.com/topic/200995-simplexml_load_file-cache/
Share on other sites

It sounds like your web server is behind a caching proxy server.

 

It would certainly help if you provided some information about where your web server is hosted at relative to where the server with the xml document is hosted at and where the browser you are using is at relative to both of those.

 

Edit: To see if there is some cache between your web server and the offending site, add a random dummy GET parameter onto the end of the URL (making each request look like it is for a different URI) -

<?php
$ran = rand();
$url = "http://xboxapi.duncanmackenzie.net/gamertag.ashx?GamerTag=cerebal%20asassin&dummy=$ran";
?>

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.