dossiers: fix the cache not actually caching
As the expensive `procedure.usual_traitement_time` was called outside of the cache, the cache was useless.
This commit is contained in:
parent
d855468cb6
commit
54813db0ad
1 changed files with 2 additions and 2 deletions
|
@ -3,7 +3,7 @@
|
|||
- procedure_path_for_which_we_hide_the_estimated_delay = 'deposer-une-offre-de-stage'
|
||||
- show_time_means = procedure.id != procedure_id_for_which_we_hide_the_estimated_delay && procedure.path != procedure_path_for_which_we_hide_the_estimated_delay
|
||||
|
||||
- if procedure.usual_traitement_time && show_time_means
|
||||
- cache(procedure, expires_in: 1.day) do
|
||||
- cache(procedure.id, expires_in: 1.day) do
|
||||
- if procedure.usual_traitement_time && show_time_means
|
||||
%p
|
||||
Habituellement, les dossiers de cette démarche sont traités dans un délai de #{distance_of_time_in_words(procedure.usual_traitement_time)}.
|
||||
|
|
Loading…
Reference in a new issue