lib/ocean/api_resource.rb
#
# Invalidate all members of this class in Varnish using a +BAN+ requests to all
# caches in the Chef environment. The +BAN+ requests are done in parallel.
# The number of +BAN+ requests, and the exact +URI+ composition in each request,
# is determined by the +invalidate_collection:+ arg to the +ocean_resource_model+
# declaration in the model.
#
Invalidate all members of this class in Varnish using a +BAN+ requests to all
caches in the Chef environment. The +BAN+ requests are done in parallel.
Invalidate all members of this class in Varnish using a + BAN + requests to all caches in the Chef environment . The + BAN + requests are done in parallel .
def invalidate
      resource_name = name.pluralize.underscore
      varnish_invalidate_collection.each do |suffix|
        Api.ban "/v[0-9]+/#{resource_name}#{suffix}"
      end
    end
def invalidate resource_name = name . pluralize . underscore varnish_invalidate_collection . each do | suffix | Api . ban "/v[0-9]+/#{resource_name}#{suffix}" end end
Invalidate all members of this class in Varnish using a +BAN+ requests to all
caches in the Chef environment.
Invalidate all members of this class in Varnish using a + BAN + requests to all caches in the Chef environment .