From 222e09f140099f3b1b8f6db1846d35e6810d43a3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicolas=20L=C5=93uillet?= Date: Wed, 13 Apr 2016 22:26:02 +0200 Subject: [PATCH] Add Cache on Share Action --- src/Wallabag/CoreBundle/Controller/EntryController.php | 2 ++ .../Resources/views/themes/baggy/Entry/entry.html.twig | 4 +--- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Wallabag/CoreBundle/Controller/EntryController.php b/src/Wallabag/CoreBundle/Controller/EntryController.php index e3b4b1eb6..c94b47f0d 100644 --- a/src/Wallabag/CoreBundle/Controller/EntryController.php +++ b/src/Wallabag/CoreBundle/Controller/EntryController.php @@ -12,6 +12,7 @@ use Wallabag\CoreBundle\Entity\Entry; use Wallabag\CoreBundle\Form\Type\EntryFilterType; use Wallabag\CoreBundle\Form\Type\EditEntryType; use Wallabag\CoreBundle\Form\Type\NewEntryType; +use Sensio\Bundle\FrameworkExtraBundle\Configuration\Cache; class EntryController extends Controller { @@ -459,6 +460,7 @@ class EntryController extends Controller * @param Entry $entry * * @Route("/share/{uuid}", requirements={"uuid" = ".+"}, name="share") + * @Cache(maxage="25200", public=true) * * @return \Symfony\Component\HttpFoundation\Response */ diff --git a/src/Wallabag/CoreBundle/Resources/views/themes/baggy/Entry/entry.html.twig b/src/Wallabag/CoreBundle/Resources/views/themes/baggy/Entry/entry.html.twig index 61b871f05..aa3d6cdcf 100644 --- a/src/Wallabag/CoreBundle/Resources/views/themes/baggy/Entry/entry.html.twig +++ b/src/Wallabag/CoreBundle/Resources/views/themes/baggy/Entry/entry.html.twig @@ -17,9 +17,7 @@
  • {{ 'entry.view.left_menu.set_as_starred'|trans }}
  • {{ 'entry.view.left_menu.add_a_tag'|trans }}
  • {{ 'entry.view.left_menu.delete'|trans }}
  • - {% if craue_setting('share_public') %} -
  • public
  • - {% endif %} + {% if craue_setting('share_public') %}
  • public
  • {% endif %} {% if craue_setting('share_twitter') %}
  • {% endif %} {% if craue_setting('share_mail') %}
  • {% endif %} {% if craue_setting('share_shaarli') %}
  • shaarli
  • {% endif %}