old_mixer_repo
old_mixer_repo copied to clipboard
Lazily evaluation of attributes: attributes as functions.
Mixer attributes today are all materialized when they are defined. This is specifically the case where an attribute is the result of evaluation of a function, like in case of an attribute producing adapter.
There are certain interesting features that are possible using this approach.
For example consider the following definition of request.XForwardedHost
request.XForwardedHost = DNS(request.headers["X-Forwarded-Host"])
In this case the attribute will only be evaluated when it is used in the dynamic path.
If config only uses it as a string, they can continue to refer to it as request.headers["X-Forwarded-Host"]
Related to issue #1099 ,