[#4604] Add a method and rake task to clear and update all TimeEntry cost caches

This commit is contained in:
Eric Davis
2010-10-06 17:35:28 -07:00
parent 16a7a3146f
commit fb3b0a41ae
3 changed files with 48 additions and 1 deletions
+6 -1
View File
@@ -1,8 +1,13 @@
namespace :rate_plugin do
namespace :cache do
desc "Update Time Entry cost caches"
desc "Update Time Entry cost caches for Time Entries without a cost"
task :update_cost_cache => :environment do
Rate.update_all_time_entries_with_missing_cost
end
desc "Clear and update all Time Entry cost caches"
task :refresh_cost_cache => :environment do
Rate.update_all_time_entries_to_refresh_cache
end
end
end