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

Load cache configurations before plugins #38

Closed
michaelhue opened this issue Apr 13, 2018 · 2 comments
Closed

Load cache configurations before plugins #38

michaelhue opened this issue Apr 13, 2018 · 2 comments

Comments

@michaelhue
Copy link
Contributor

Problem

Some plugins like yar access the cache while registering. Cache configurations are registered after plugins and are not available to plugins.

Workaround

Provision caches in the register function of the main lib/index.js plugin, before calling HauteCouture.using().

Proposed solutions

  • Register caches before plugins if possible.
  • Allow user to change the registration order.

I can provide a pull request if you like. Wanted to make sure I didn't miss something by discussing it first.

P.S. Thanks for creating this suite of tools, cleared up some insecurities I had about Hapi.

@devinivy
Copy link
Member

Allow user to change the registration order.

That's currently possible using amendments, but feel free to offer any suggestions to make that simpler. Maybe some day we could add a modify option (in addition to add and remove).

Register caches before plugins if possible.

I think this is the solution we're looking for!

Sounds good to me—go for it. Thanks for the nice issue writeup! And cheers 🍻 very glad to make folks feel more comfortable about their choice to use hapi.

@devinivy
Copy link
Member

3.0.1 is released 👌thanks again, @michaelhue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants