As long as your not doing extra work with request.registry.settings I think
being lazy is a good thing when it comes to development :-)

Alternatively, you could use the *config.add_request_method* with reify set
to True (
http://docs.pylonsproject.org/projects/pyramid-cookbook/en/latest/auth/user_object.html
).

On Tue, Mar 1, 2016 at 7:28 PM, Jonathan Vanasco <jonat...@findmeon.com>
wrote:

> I have a bit of code that generates a few lists based on data in the
> active `.ini`
>
> These lists will never change for the lifetime of the process.
>
> Right now I'm just hitting request.registry.settings on every request -
> but this just makes me feel like I'm being lazy.
>
> Is there a good place to just parse this stuff into structured data once?
> I'm thinking the ApplicationCreated event would be good -- then I could
> either stash it in the registry or a global namespace.  Does that sound
> okay?
>
> --
> You received this message because you are subscribed to the Google Groups
> "pylons-discuss" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to pylons-discuss+unsubscr...@googlegroups.com.
> To post to this group, send email to pylons-discuss@googlegroups.com.
> Visit this group at https://groups.google.com/group/pylons-discuss.
> For more options, visit https://groups.google.com/d/optout.
>



-- 
Vincent Catalano
Software Engineer and Web Developer,
(520).603.8944

-- 
You received this message because you are subscribed to the Google Groups 
"pylons-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to pylons-discuss+unsubscr...@googlegroups.com.
To post to this group, send email to pylons-discuss@googlegroups.com.
Visit this group at https://groups.google.com/group/pylons-discuss.
For more options, visit https://groups.google.com/d/optout.

Reply via email to