You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I think bracketHandler could be more intelligent with regard to snaplets' behavior. Using it on Heist (for example) makes the acquire and release actions run for url patterns that it has no templates for and as such would never accept. It would never invoke any user splice code in such a case. Any reasonable pair of acquire and release actions should be a no op in such a case, besides wasting some resources. It would be a nice optimization for Snap for it to skip using them in such a case.
I'm not quite sure how to go about implementing something like this. A Handler, as a monad, is opaque to whether it would reject a particular url and by the time it returns empty the acquire action has been called already.
The text was updated successfully, but these errors were encountered:
I think
bracketHandler
could be more intelligent with regard to snaplets' behavior. Using it on Heist (for example) makes the acquire and release actions run for url patterns that it has no templates for and as such would never accept. It would never invoke any user splice code in such a case. Any reasonable pair of acquire and release actions should be a no op in such a case, besides wasting some resources. It would be a nice optimization for Snap for it to skip using them in such a case.I'm not quite sure how to go about implementing something like this. A Handler, as a monad, is opaque to whether it would reject a particular url and by the time it returns empty the acquire action has been called already.
The text was updated successfully, but these errors were encountered: