Get the Desktop App for Battle.net Now
- All your games in 1 place
- Log in once
- Automatic game updates
Hey all, I'm trying to set up some cacheing for players when i pull them (testing with local .json files currently.) However, the cacheing isn't working and is AWLAYS updating no matter if the last-modified are the same. Was wondering if anyone could help me out and take a look on it.
I basically reused a WOW API cache that i use and replaced it with the D3 information, but it's not working. Wondering if anyone else has had trouble.
There is never any comparison between cached and fetched files?
You 'initialize' $lastModified
Then set it to the cached value
Then set it to the remote value
But never compare the values and since $curl_return will always be non-zero you're going to overwrite it in all cases
Something like should work
Allrighty, figured it out, just incase anyone else was trying their API. It had nothing to do with the comparison, as the TIMEVALUE and COND do that for me, it was the fact that I had the item hosted locally, and the real time since mod wasn't the same as the last-updated. Once I updated the last-updated on my cache files to real time it worked fine.
Threats of violence. We take these seriously and will alert the proper authorities.
Posts containing personal information about other players. This includes physical addresses, e-mail addresses, phone numbers, and inappropriate photos and/or videos.
Harassing or discriminatory language. This will not be tolerated.