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:
Pierre de La Morinerie 2019-04-10 16:58:33 +02:00
parent d855468cb6
commit 54813db0ad

View file

@ -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)}.