Exemplo n.º 1
0
 public function testSetLimit()
 {
     Cache::setLimit(10);
     $this->assertEquals(10, Cache::getLimit());
     Cache::setLimit(1);
     $this->assertEquals(1, Cache::getLimit());
 }
Exemplo n.º 2
0
 public function __construct($cacheDisabled, $type, $directory, $lifetime = null, $limit = null)
 {
     $isEnabled = (bool) $cacheDisabled ? BaseCache::DISABLED : BaseCache::ENABLED;
     BaseCache::setEnabled($isEnabled);
     BaseCache::setType($type);
     BaseCache::setDirectory($directory);
     if (null !== $lifetime) {
         BaseCache::setLifetime($lifetime);
     }
     if (null !== $limit) {
         BaseCache::setLimit($limit);
     }
 }