Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Expose cache engine connection isReady as public method #114

Merged
merged 6 commits into from Jun 6, 2015

Conversation

@subvertnormality
Copy link
Contributor

subvertnormality commented Dec 9, 2014

It is useful to be able to check whether the cache engine is ready, particularly when implementing client cache reconnection schemes.

Since the function already exists on the engine that is passed in, it is trivial to expose this useful method as a public function on the cache policy.


internals.Policy.prototype.isReady = function () {

return this._cache.connection.isReady();

This comment has been minimized.

Copy link
@hueniverse

hueniverse Dec 9, 2014

Member

_cache can be null.

@hueniverse hueniverse added the feature label Dec 9, 2014
@subvertnormality

This comment has been minimized.

Copy link
Contributor Author

subvertnormality commented Jan 27, 2015

Is anything else needed here to get this merged in?

README.md Outdated
- `options` - the same `options` as the `Policy` constructor.
- `isReady()` - `true` if cache engine determines itself as ready, `false`if it is not ready or if there is no cache engine set.

This comment has been minimized.

Copy link
@hueniverse

hueniverse Feb 4, 2015

Member

Missing "returns..."

done();
});
});

});

This comment has been minimized.

Copy link
@hueniverse

hueniverse Feb 4, 2015

Member

Remove extra empty line 1878

@hueniverse

This comment has been minimized.

Copy link
Member

hueniverse commented Feb 4, 2015

Just two small nits. Once fixed I'll merge.

@hueniverse hueniverse self-assigned this Feb 4, 2015
@subvertnormality

This comment has been minimized.

Copy link
Contributor Author

subvertnormality commented Mar 18, 2015

Any chance in getting this merged? @hueniverse

@hueniverse hueniverse added this to the 4.2.3 milestone Jun 6, 2015
hueniverse added a commit that referenced this pull request Jun 6, 2015
Expose cache engine connection isReady as public method
@hueniverse hueniverse merged commit 6a8c248 into hapijs:master Jun 6, 2015
1 check passed
1 check passed
continuous-integration/travis-ci/pr The Travis CI build passed
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.