API and purge_cache seems not works


#1

i’m using the api’s purge_cache about specific files (images) uploaded from users on my domain.

When they upload an image, i call the purge_cache passing the image url, I’m sure to sent the right URLs of files to purge as API’s info suggest.

That urls are correct and the API response seems correct as well :

{result: {…}, success: true, errors: Array(0), messages: Array(0)}
errors :    []
messages :    []
result :  {id: "254df5926fcc9df7b89b6d0bfff88dfb"}
success :  true

But the browser still return the cached images (yes i did CTRL+F5, tryied incognito mode ad others plugin to clean the browser cache without results).

What i’m wrong?


#2

I found the problem, i’m gonna write it down for someone who has my same trouble.

You can visit my site using both urls:
http://www.mysite.com
http://mysyte.com

I was calling the API to purge an image file just with that url http://www.mysite.com/profile.png but really you need to pass even this one http://mysite.com/profile.png (without www prefix).

Now it’s ok.
Thanks


#3

This topic was automatically closed after 14 days. New replies are no longer allowed.