Hi guys!

I've found the sollution. If I use to following code, it works:

"""
from django.views.generic.simple import direct_to_template

urlpatterns = patterns('',
    (r'^$', cache_page(direct_to_template, 60*15),
{'template':'home.html'}),
)
"""

Note that I specify the cache timeout in the cache_page decorator
reather than use the default one. The docs are clear about the timeout
argument and there is no example of a cache_page decorator applyed
without the timeout arg.

Anyway, that used to work in django1.1, I think it would be great to
have a "new in django1.2" mark telling about this.

What do you recomend for a default cache timeout value? May I create a
CACHE_TIMEOUT var on settings and use it in urls?

Thanks!

--
Michel Sabchuk
Brazil

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@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