diff --git a/lib/BridgeAbstract.php b/lib/BridgeAbstract.php index 72cb4585..0bd1c7c7 100644 --- a/lib/BridgeAbstract.php +++ b/lib/BridgeAbstract.php @@ -270,12 +270,6 @@ abstract class BridgeAbstract implements BridgeInterface { $this->cache = $cache; } - /** - * Sets the cache timeout to the provided timeout value. The specified - * timeout must be between 1..86400, otherwise the default timeout is used. - * - * @param int $timeout The timeout in seconds - */ public function setCacheTimeout($timeout){ if(is_numeric($timeout) && ($timeout < 1 || $timeout > 86400)) { $this->cacheTimeout = static::CACHE_TIMEOUT; @@ -285,12 +279,7 @@ abstract class BridgeAbstract implements BridgeInterface { $this->cacheTimeout = $timeout; } - /** - * Returns the cache timeout - * - * @return int Returns the cache timeout - */ - protected function getCacheTimeout(){ + public function getCacheTimeout(){ return isset($this->cacheTimeout) ? $this->cacheTimeout : static::CACHE_TIMEOUT; } } diff --git a/lib/BridgeInterface.php b/lib/BridgeInterface.php index 65ea8a65..b8f5cf47 100644 --- a/lib/BridgeInterface.php +++ b/lib/BridgeInterface.php @@ -77,4 +77,11 @@ interface BridgeInterface { * @param int $timeout The cache timeout in seconds */ public function setCacheTimeout($timeout); + + /** + * Returns the cache timeout + * + * @return int Cache timeout + */ + public function getCacheTimeout(); }