class Sprockets::Cache::FileStore

def gc!

def gc!
  start_time = Time.now
  caches = find_caches
  size = compute_size(caches)
  delete_caches, keep_caches = caches.partition { |filename, stat|
    deleted = size > @gc_size
    size -= stat.size
    deleted
  }
  return if delete_caches.empty?
  FileUtils.remove(delete_caches.map(&:first), force: true)
  @size = compute_size(keep_caches)
  @logger.warn do
    secs = Time.now.to_f - start_time.to_f
    "#{self.class}[#{@root}] garbage collected " +
      "#{delete_caches.size} files (#{(secs * 1000).to_i}ms)"
  end
end