cartodb-4.42/app/models/carto/helpers/varnish_cache_handler.rb

7 lines
187 B
Ruby
Raw Normal View History

2024-04-06 13:25:13 +08:00
module Carto::VarnishCacheHandler
def invalidate_varnish_cache(options = {})
options[:regex] ||= '.*'
CartoDB::Varnish.new.purge("#{database_name}#{options[:regex]}")
end
end