Stash\Item::isDisabled PHP Method

isDisabled() public method

public isDisabled ( )
    public function isDisabled()
    {
        return self::$runtimeDisable || !$this->cacheEnabled || defined('STASH_DISABLE_CACHE') && STASH_DISABLE_CACHE;
    }

Usage Example

Example #1
0
 public function testClear()
 {
     $item = new Item();
     $poolStub = new PoolGetDriverStub();
     $poolStub->setDriver(new DriverExceptionStub());
     $item->setPool($poolStub);
     $item->setKey(array('path', 'to', 'clear'));
     $this->assertFalse($item->isDisabled());
     $this->assertFalse($item->clear());
     $this->assertTrue($item->isDisabled(), 'Is disabled after exception is thrown in driver');
 }
All Usage Examples Of Stash\Item::isDisabled