Consider moving request/response dependencies into the controller actions #211
matthewmueller
announced in
Proposals
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Right now you're able to do something like this:
And Bud is smart enough to initialize
*postgres.Client
once on boot and*session.Session
per request. This was done to keep the function signature of the actions clean and focused on the inputs and outputs.Suppose Load was an expensive operation though. It would be very surprising to learn that Load is called every request. I'm now leaning towards something like this:
And then separating inputs from dependencies.
See for more discussion: #185 (comment)
Beta Was this translation helpful? Give feedback.
All reactions