Skip to content

Instantly share code, notes, and snippets.

@johnl
Created November 16, 2009 16:33
Show Gist options
  • Save johnl/236114 to your computer and use it in GitHub Desktop.
Save johnl/236114 to your computer and use it in GitHub Desktop.
require 'socket'
tmp_cache_dir = [Socket.gethostname, Process.pid, Time.now.to_i, rand(0xffff)].to_s
page_cache_tree = File.join(ApplicationController.page_cache_directory, 'entries')
FileUtils.mv(page_cache_tree, page_cache_tree + tmp_cache_dir)
FileUtils.rm_rf(page_cache_tree + '-' + tmp_cache_dir)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment