Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

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.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6357565
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T23:11:26+00:00 2026-05-24T23:11:26+00:00

I want create project wide accessible storage for project/application settings. What i want to

  • 0

I want create project wide accessible storage for project/application settings.

What i want to achieve: – Each app has it’s own app specific settings stored in db – When you spawn django wsgi process each settings are stored in memory storage and are available project wide – Whenever you change any setting value in db there is a call to regenerate storage from db

So it works very close to cache but I can’t use cache mechanism because it’s serializing data. I can also use memcache for that purpose but i want to develop generic solution (not always you have access to memcache).

If anyone have any ideas to solve my problem i would be really gratefully for sharing.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-24T23:11:27+00:00Added an answer on May 24, 2026 at 11:11 pm

    Before giving any specific advice to you, you need to be aware of the limitations of these systems.

    ISSUES

    • Architectural Differences between Django and PHP/other popular language.

      PHP re-reads and re-evaluates the entire code tree every time a page is accessed. This allows PHP to re-read settings from DB/cache/whatever on every request.

    • Initialisation

      Many django apps initialise their own internal cache of settings and parameters and perform validation on these parameters at module import time (server start) rather than on every request. This means you would need a server restart anyway when modifying any settings for non db-settings enabled apps, so why not just change settings.py and restart server?

    • Multi-site/Multi-instance and in-memory settings

      In Memory changes are strictly discouraged by Django docs because they will only affect a single server instance. In the case of multiple sites (contrib.sites), only a single site will recieve updates to shared settings. In the case of instanced servers (ep.io/gondor) any changes will only be made to a local instance, not every instance running for your site. Tread carefully

    PERFORMANCE

    • In Memory Changes

      Changing settings values while the server is running is strictly discouraged by django docs for the reasons outlined above. However there is no performance hit with this option. USE ONLY WITHIN THE CONFINES OF SPECIFIC APPS MADE BY YOU AND SINGLE SERVER/INSTANCE.

    • Cache (redis-cache/memcached)

      This is the intermediate speed option. Reasonably fast lookup of settings which can be deserialised into complex python structures easily – great for dict-configs. IMPORTANT is that values are shared among Sites/Instances safely and are updated atomically.

    • DB (SLOOOOW)

      Grabbing one setting at a time from DB will be very very slow unless you hack in connection pooling. grabbing all settings at once is faster but increases db transfer on every single request. Settings synched between Sites/Instances safely. Use only for 1 or 2 settings and it would be reasonable to use.

    CONCLUSION

    Storing configuration values in database/cache/mem can be done, but you have to be aware of the caveats, and the potential performance hit. Creating a generic replacement for settings.py will not work, however creating a support app that stores settings for other apps could be a viable solution, as long as the other apps accept that settings must be reloaded every request.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I want to create a maven project, which has to depend on a non
I want to create an InstallShield Project that has a custom dialog containing a
I want to create a jQuery template(s) that will be used project wide. I
I want to create a 'new project' wizard for my application. The first page
I want to create a project that uses source files already on my filesystem,
Here's what I'd like to do: I want to create a library project that
I want to create a folder inside a C# project to contain some configuration
I want to create a business directory project. I want to start two businesses
I want to create a vb.net project that I will use to only hold
I want to create a List of KeyValuePair s in a managed C++ project.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.