Wednesday, July 28, 2010

generate cache by visiting protected links

Hi,


i have cache enabled on a few heavy statistical views.
I would like to generate the pages before a user goes to that page and maybe even
regenerate the pages every hour to avoid the initial delay.
However, i can't seem to automate the caching as my site's authentication gets in the way
of automating this.

I've tried code that i googled that performs a cookie based login
using urllib and urllib2 but that didn't work.

Basically, i would need a view that is started when the server starts and gets called
every hour to generate or visit the url of the stats page.
And this would have to be via a logged in user as otherwise access to the stats is forbidden.

Any ideas?

Thanks !

--
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+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/django-users?hl=en.

No comments:

Post a Comment