Cache miss resolves with null value#22
Merged
WyriHaximus merged 1 commit intoreactphp:masterfrom Feb 15, 2018
Merged
Conversation
Member
Author
|
This PR is ready for review now |
clue
reviewed
Feb 6, 2018
README.md
Outdated
| [promises](https://github.com/reactphp/promise). | ||
|
|
||
| If the key `foo` does not exist, the promise will be rejected. | ||
| If the key `foo` does not exist, the promise will be resolve with null as value. |
Member
There was a problem hiding this comment.
[…] the promise will resolve with null as value.
Member
There was a problem hiding this comment.
i'd be even more explicit:
[…] the promise will fulfill with null as value.
jsor
reviewed
Feb 6, 2018
README.md
Outdated
| exist in the cache. | ||
| First an attempt is made to retrieve the value of `foo`. A callback function is | ||
| registered that will call `getFooFromDb` when the resulting value is null. | ||
| `getFooFromDb` is afunction (can be any PHP callable) that will be called if the |
jsor
reviewed
Feb 6, 2018
README.md
Outdated
| ->then(null, array($this, 'getAndCacheFooFromDb')) | ||
| ->then(function ($result) { | ||
| if ($result === null) { | ||
| return $this->getFooFromDb(); |
WyriHaximus
added a commit
to WyriHaximus-labs/cache
that referenced
this pull request
Feb 7, 2018
WyriHaximus
added a commit
to WyriHaximus-labs/cache
that referenced
this pull request
Feb 7, 2018
WyriHaximus
added a commit
to WyriHaximus-labs/cache
that referenced
this pull request
Feb 7, 2018
jsor
approved these changes
Feb 7, 2018
clue
reviewed
Feb 8, 2018
README.md
Outdated
| [promises](https://github.com/reactphp/promise). | ||
|
|
||
| If the key `foo` does not exist, the promise will be rejected. | ||
| If the key `foo` does not exist, the promise will fullfill with `null` as value. |
Member
There was a problem hiding this comment.
Minor typo fulfill, maybe even use will be fulfilled here?
WyriHaximus
added a commit
to WyriHaximus-labs/cache
that referenced
this pull request
Feb 10, 2018
clue
approved these changes
Feb 15, 2018
Member
clue
left a comment
There was a problem hiding this comment.
Changes LGTM, can you squash this to a reasonable number of commits before merging?
👍
Member
Author
|
@clue will do 👍 |
a255158 to
a9400f3
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
As discussed in #13, a failing
getshould resolve withnullinstead of rejecting.To do:
Implements / closes #13