Purge All The Things
March 7, 2013 | David LitvakPurging files is such a frequently used API call, We gave you shortcuts for it!
zone_id = 12345 # Purge a Single File api.purge(zone_id, '/some/file') # Purge Multiple Files (Sequential) api.purge(zone_id, ['/some/file', '/another/file', ..., '/more/files']) # Purge Zone Cache api.purge(zone_id)
message. If you prefer to receive your errors as JSON instead of exceptions you can add to your calls (also works with every other API call):
api.purge(12345, '/file', debug_json=True)
api.purge(12345, '/file', :debug_json => true)
api.delete('/zones/pull.json/12345/cache'), just making it a lot easier for you!!!
Do you have an idea how much time I spent this morning debugging this change in our Ruby Library??? 1 Hour. Reason I mistaken a
,inside a string and my editor's font was so small that I couldn't tell the difference. I was pointing to the wrong URL the whole time. After some laughs and facepalms. We pushed this changes to our new versions! Send us your feedback! Big thanks goes out Jack Chu for his request.