From 0f44076e48c847f87d34fd915517b7853ca3559e Mon Sep 17 00:00:00 2001 From: Dmitriy Simushev Date: Fri, 20 Mar 2015 13:15:32 +0000 Subject: [PATCH] Use unexpired cache for routes by default --- .../libs/classes/Mibew/Routing/Loader/CacheLoader.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/mibew/libs/classes/Mibew/Routing/Loader/CacheLoader.php b/src/mibew/libs/classes/Mibew/Routing/Loader/CacheLoader.php index f73a8f75..ce7d082c 100644 --- a/src/mibew/libs/classes/Mibew/Routing/Loader/CacheLoader.php +++ b/src/mibew/libs/classes/Mibew/Routing/Loader/CacheLoader.php @@ -45,11 +45,11 @@ class CacheLoader extends Loader * Constructor of the class. * * @param PoolInterface $cache An instance of cache pool. - * @param int $max_age Maximum time in seconds the cache can be stored. - * Notice that the cache can be invalidated before the max age timeout is - * expired. + * @param int|null $max_age Maximum time in seconds the cache can be stored. + * If the null is passed in the cache will never expired but can be + * invalidated by some other resons. */ - public function __construct(PoolInterface $cache, $max_age = 600) + public function __construct(PoolInterface $cache, $max_age = null) { $this->cache = $cache; $this->cacheMaxAge = $max_age;