Updated Cache class

This commit is contained in:
Francis Besset 2011-10-11 22:41:32 +02:00
parent d3c31116c7
commit 4a7ec164e5
1 changed files with 3 additions and 1 deletions

View File

@ -21,7 +21,9 @@ class Cache
{ {
public function __construct($disabled, $type, $directory, $lifetime = null, $limit = null) public function __construct($disabled, $type, $directory, $lifetime = null, $limit = null)
{ {
BaseCache::setEnabled(!$disabled); $isEnabled = $disabled ? BaseCache::DISABLED : BaseCache::ENABLED;
BaseCache::setEnabled($isEnabled);
if (BaseCache::ENABLED == BaseCache::isEnabled()) { if (BaseCache::ENABLED == BaseCache::isEnabled()) {
BaseCache::setType($type); BaseCache::setType($type);