lib/splash/backends/file.rb in prometheus-splash-0.5.0 vs lib/splash/backends/file.rb in prometheus-splash-0.5.2
- old
+ new
@@ -34,9 +34,13 @@
def exist?(options)
return ::File.exist?("#{@path}/#{suffix_trace(options[:key])}")
end
+ def flush
+ Dir.glob("#{@path}/*.trace").each { |file| ::File.delete(file)}
+ end
+
private
def suffix_trace(astring)
return "#{astring}.trace"
end