setDueDate() public method

Set with expiration on concrete date
public setDueDate ( integer | string $key, mixed $value, integer $timestamp, array $tags = null )
$key integer | string
$value mixed
$timestamp integer
$tags array
Example #1
0
 public function testSetDueDate_ExistedKey()
 {
     $this->cache->setDueDate('php', 'Old Value', time() + 100);
     $this->assertEquals('Old Value', $this->cache->get('php'));
     $this->cache->setDueDate('php', 'PHP: Hypertext Processor', time() + 1);
     $this->assertEquals('PHP: Hypertext Processor', $this->cache->get('php'));
     usleep(2000000);
     $this->assertEmpty($this->cache->get('php'));
 }