cartodb/app/models/varnish_cache_handler.rb

6 lines
179 B
Ruby
Raw Normal View History

2020-06-15 10:58:47 +08:00
module VarnishCacheHandler
def invalidate_varnish_cache(options = {})
options[:regex] ||= '.*'
CartoDB::Varnish.new.purge("#{database_name}#{options[:regex]}")
end
end