Re: static list and start server process

2009-10-29 Thread Javier Guerra

On Thu, Oct 29, 2009 at 7:48 AM, Manuel Ignacio  wrote:
> Hello, i have a menu list stored at my database, i want to obtain it
> only at start server process, and later when add a menu
> entry this list should be updated, i have the following
> considerations:
>
> 1. I don't want a database query for every request, because menu entry
> list would be very low frecuency updated

check 
http://docs.djangoproject.com/en/dev/topics/cache/#template-fragment-caching

specifically the {% cache %}  {% endcache %} tag


-- 
Javier

--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



static list and start server process

2009-10-29 Thread Manuel Ignacio

Hello, i have a menu list stored at my database, i want to obtain it
only at start server process, and later when add a menu
entry this list should be updated, i have the following
considerations:

1. I don't want a database query for every request, because menu entry
list would be very low frecuency updated

I think that i could run a method at start server processes, create a
static list and when a menu entry entry operation happened
at database, update the static list

I don't know how to implement this in an efficient manner

Regards
--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---