lib/fastly.rb in fastly-1.3.0 vs lib/fastly.rb in fastly-1.4.0
- old
+ new
@@ -72,11 +72,11 @@
fail FullAuthRequired unless fully_authed?
@current_user ||= get(User)
end
# Purge the specified path from your cache.
- def purge(path)
- client.post("/purge/#{path}")
+ def purge(url, soft=false)
+ client.purge(url, soft ? { headers: { 'Fastly-Soft-Purge' => "1"} } : {})
end
# Fetches historical stats for each of your fastly services and groups the results by service id.
#
# If you pass in a :field opt then fetches only the specified field.