On 5/04/2012 4:53pm, Lars Ruoff wrote:
Sorry, that message went off (twice!) while i was in the middle of
typing :-)

The question is:
How do i load static global data once and for all at server startup.

I think you would need to implement caching. See https://docs.djangoproject.com/en/dev/topics/cache/

Also, if you really want it pre-loaded you would probably need to write a program to ensure all static data is fetched at webserver restart.

But, normally static data isn't served by Django. It is usually kept in a separate location from your Django code and served directly by the webserver without getting Django involved at all. See https://docs.djangoproject.com/en/dev/howto/static-files/

Good luck

Mike

I.e. i'd like to have that data in memory and accessible from any view
during the lifetime of the server, so that it needs NOT to be loaded
for any access to the site/view.

Hope the question is clear.
Regards,
Lars


--
You received this message because you are subscribed to the Google Groups "Django 
users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.

Reply via email to