Commit 12ffc2378cce2d61b9788de3551441738e393d14
1 parent
fe3e7717
Exists in
colab
and in
4 other branches
Rename update_caches to clear_caches for better semantics
Signed off by: Eduardo Araújo <duduktamg@hotmail.com>
Showing
1 changed file
with
4 additions
and
4 deletions
Show diff stats
app/controllers/metric_configurations_controller.rb
| ... | ... | @@ -20,7 +20,7 @@ class MetricConfigurationsController < BaseMetricConfigurationsController |
| 20 | 20 | respond_to do |format| |
| 21 | 21 | create_and_redir(format) |
| 22 | 22 | end |
| 23 | - update_caches | |
| 23 | + clear_caches | |
| 24 | 24 | end |
| 25 | 25 | |
| 26 | 26 | def edit |
| ... | ... | @@ -38,7 +38,7 @@ class MetricConfigurationsController < BaseMetricConfigurationsController |
| 38 | 38 | if @metric_configuration.update(metric_configuration_params) |
| 39 | 39 | format.html { redirect_to(kalibro_configuration_path(@metric_configuration.kalibro_configuration_id), notice: t('successfully_updated', :record => t(metric_configuration.class))) } |
| 40 | 40 | format.json { head :no_content } |
| 41 | - update_caches | |
| 41 | + clear_caches | |
| 42 | 42 | else |
| 43 | 43 | failed_action(format, 'edit') |
| 44 | 44 | end |
| ... | ... | @@ -51,7 +51,7 @@ class MetricConfigurationsController < BaseMetricConfigurationsController |
| 51 | 51 | format.html { redirect_to kalibro_configuration_path(params[:kalibro_configuration_id]) } |
| 52 | 52 | format.json { head :no_content } |
| 53 | 53 | end |
| 54 | - update_caches | |
| 54 | + clear_caches | |
| 55 | 55 | end |
| 56 | 56 | |
| 57 | 57 | protected |
| ... | ... | @@ -67,7 +67,7 @@ class MetricConfigurationsController < BaseMetricConfigurationsController |
| 67 | 67 | |
| 68 | 68 | private |
| 69 | 69 | |
| 70 | - def update_caches | |
| 70 | + def clear_caches | |
| 71 | 71 | Rails.cache.delete("#{params[:kalibro_configuration_id]}_tree_metric_configurations") |
| 72 | 72 | Rails.cache.delete("#{params[:kalibro_configuration_id]}_hotspot_metric_configurations") |
| 73 | 73 | end | ... | ... |