aboutsummaryrefslogtreecommitdiffstats
path: root/railties/lib/rails/tasks/dev.rake
diff options
context:
space:
mode:
Diffstat (limited to 'railties/lib/rails/tasks/dev.rake')
-rw-r--r--railties/lib/rails/tasks/dev.rake15
1 files changed, 15 insertions, 0 deletions
diff --git a/railties/lib/rails/tasks/dev.rake b/railties/lib/rails/tasks/dev.rake
new file mode 100644
index 0000000000..e949172d3f
--- /dev/null
+++ b/railties/lib/rails/tasks/dev.rake
@@ -0,0 +1,15 @@
+namespace :dev do
+ task :cache do
+ desc 'Toggle development mode caching on/off'
+
+ if File.exist? 'tmp/caching-dev.txt'
+ File.delete 'tmp/caching-dev.txt'
+ puts 'Development mode is no longer being cached.'
+ else
+ FileUtils.touch 'tmp/caching-dev.txt'
+ puts 'Development mode is now being cached.'
+ end
+
+ FileUtils.touch 'tmp/restart.txt'
+ end
+end