lib/fastly-rails/client.rb in fastly-rails-0.1.7 vs lib/fastly-rails/client.rb in fastly-rails-0.2.0
- old
+ new
@@ -6,9 +6,10 @@
def initialize(opts={})
super(Fastly.new(opts))
end
def purge_by_key(key)
+ client.require_key!
client.post purge_url(key)
end
def purge_url(key)
"/service/#{FastlyRails.service_id}/purge/#{key}"