class ActiveSupport::Cache::FileStore
def clear(options = nil)
file store directory except for .keep or .gitkeep. Be careful which directory is specified in your
Deletes all items from the cache. In this case it deletes all the entries in the specified
def clear(options = nil) root_dirs = (Dir.children(cache_path) - GITKEEP_FILES) FileUtils.rm_r(root_dirs.collect { |f| File.join(cache_path, f) }) rescue Errno::ENOENT, Errno::ENOTEMPTY end