@@ -41,7 +41,7 @@ |
||
| 41 | 41 | $hash = $this->getHash($widget); |
| 42 | 42 | if ($hash) { |
| 43 | 43 | $this->redis->set($hash, $content); |
| 44 | - $this->redis->expire($hash, 7 * 24 * 60 * 1000); // cache for a week |
|
| 44 | + $this->redis->expire($hash, 7*24*60*1000); // cache for a week |
|
| 45 | 45 | } |
| 46 | 46 | } |
| 47 | 47 | |
@@ -86,6 +86,9 @@ |
||
| 86 | 86 | ); |
| 87 | 87 | } |
| 88 | 88 | |
| 89 | + /** |
|
| 90 | + * @param Widget $widget |
|
| 91 | + */ |
|
| 89 | 92 | private function generateHash($widget) |
| 90 | 93 | { |
| 91 | 94 | return sprintf('%s-%s-%s-%s', |
@@ -4,7 +4,6 @@ |
||
| 4 | 4 | |
| 5 | 5 | use Predis\Client; |
| 6 | 6 | use Symfony\Component\Security\Core\Authorization\AuthorizationChecker; |
| 7 | -use Symfony\Component\Security\Core\SecurityContext; |
|
| 8 | 7 | use Victoire\Bundle\WidgetBundle\Entity\Widget; |
| 9 | 8 | use Victoire\Bundle\WidgetBundle\Entity\WidgetSlotInterface; |
| 10 | 9 | |
@@ -40,7 +40,7 @@ discard block |
||
| 40 | 40 | /** |
| 41 | 41 | * Update css by removing old file and writing new file. |
| 42 | 42 | * |
| 43 | - * @param $oldHash |
|
| 43 | + * @param string $oldHash |
|
| 44 | 44 | * @param View $view |
| 45 | 45 | * @param array $widgets |
| 46 | 46 | */ |
@@ -170,7 +170,7 @@ discard block |
||
| 170 | 170 | * Write css file. |
| 171 | 171 | * |
| 172 | 172 | * @param $view |
| 173 | - * @param $css |
|
| 173 | + * @param string $css |
|
| 174 | 174 | */ |
| 175 | 175 | private function writeCssFile(View $view, $css) |
| 176 | 176 | { |
@@ -24,7 +24,6 @@ |
||
| 24 | 24 | * WidgetRenderer constructor. |
| 25 | 25 | * |
| 26 | 26 | * @param Container $container |
| 27 | - * @param Client $redis |
|
| 28 | 27 | * @param WidgetCache $widgetCache |
| 29 | 28 | */ |
| 30 | 29 | public function __construct(Container $container, WidgetCache $widgetCache) |