Skip to content

Commit

Permalink
Merge pull request #28048 from Eldair/5.8
Browse files Browse the repository at this point in the history
[5.8] Update forever cache duration for database driver from minutes to seconds
  • Loading branch information
taylorotwell authored Mar 28, 2019
2 parents f1652c7 + adee424 commit dbf5ced
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/Illuminate/Cache/DatabaseStore.php
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@ protected function getTime()
*/
public function forever($key, $value)
{
return $this->put($key, $value, 5256000);
return $this->put($key, $value, 315360000);
}

/**
Expand Down
2 changes: 1 addition & 1 deletion tests/Cache/CacheDatabaseStoreTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ public function testValueIsInsertedOnPostgres()
public function testForeverCallsStoreItemWithReallyLongTime()
{
$store = $this->getMockBuilder(DatabaseStore::class)->setMethods(['put'])->setConstructorArgs($this->getMocks())->getMock();
$store->expects($this->once())->method('put')->with($this->equalTo('foo'), $this->equalTo('bar'), $this->equalTo(5256000))->willReturn(true);
$store->expects($this->once())->method('put')->with($this->equalTo('foo'), $this->equalTo('bar'), $this->equalTo(315360000))->willReturn(true);
$result = $store->forever('foo', 'bar');
$this->assertTrue($result);
}
Expand Down

0 comments on commit dbf5ced

Please sign in to comment.