I am making a Google AppEngine application and am doubting were I should store (sensitive) configuration data like credentials.
Should I make a single bigtable entity for configuration, or is there another advised way to store it.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
If you’re okay with embedding them in your source, you can do that, but if you need it to be dynamically configurable, the datastore is the way to go. You can avoid fetching the settings on every request by caching them in local memory. Here’s a helper class for that:
Simply subclass this with whatever configuration values you need (or modify the class itself). Because loaded code persists between requests, you’ll only have to do a single fetch per app instance – though if you want to be able to update the configuration dynamically, you may want to build in a timeout.
If you want to cache stuff for a limited time, your best option is simply storing the timestamp when you fetched it: