Skip to content

Commit

Permalink
Port dontRemember and doNotRemember
Browse files Browse the repository at this point in the history
  • Loading branch information
dwightwatson committed Aug 23, 2016
1 parent 39cdb2f commit 7ab6978
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions src/Query/Builder.php
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,28 @@ public function rememberForever($key = null)
return $this->remember(-1, $key);
}

/**
* Indicate that the query should not be cached.
*
* @return \Illuminate\Database\Query\Builder|static
*/
public function dontRemember()
{
$this->cacheMinutes = $this->cacheKey = $this->cacheTags = null;

return $this;
}

/**
* Indicate that the query should not be cached. Alias for dontRemember().
*
* @return \Illuminate\Database\Query\Builder|static
*/
public function doNotRemember()
{
return $this->dontRemember();
}

/**
* Indicate that the results, if cached, should use the given cache tags.
*
Expand Down

0 comments on commit 7ab6978

Please sign in to comment.