Skip to content

Conversation

@lucasmichot
Copy link
Contributor

@lucasmichot lucasmichot commented Jul 13, 2017

At the moment when using the Cache repository, we can only pass an instance of \DateTime or an integer for the duration.


This is therefore impossible to use \DateTimeImmutable for example.
Also we sometimes wish to use a \DateInterval.


This PR allows to use any kind of \DateInterface, \DateInterval and integers

* @param string $key
* @param mixed $value
* @param \DateTime|float|int $minutes
* @param \DateTimeInterface|\DateInterval|float|int $minutes
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We could probably have mixed there, but I've let this on purpose; this can be modified before 5.5 release if necessary.

@taylorotwell taylorotwell merged commit 11df2df into laravel:master Jul 13, 2017
@lucasmichot lucasmichot deleted the feature/master/cache branch July 13, 2017 13:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants