(For gurus) Embed functions in webpages like in PHP?

Denis S. Otkidach ods at strana.ru
Fri Apr 16 11:24:48 EDT 2004


On Fri, 16 Apr 2004, Thomas Guettler wrote:

TG> The problem with caching: When is
TG> the data outdate?
TG>
TG> You could use this approach:
TG> Run a cron-job every hour which does the complicated
TG> query which needs long to compute. Dump
TG> the result into a file (Look for "pickle"
TG> in the module index of the docs).
TG>
TG> Load this file for every request
TG> and insert this into the template.

Similar approach is used in QPS (http://ppa.sf.net/#qps), where
static and semi-static pages are generated with cron job and/or
on data update events.  It is successfully used for several large
(>2Gb of HTML files) heavy loaded (millions of requests/day)
frequently udated (thousands of updates/day).  Unfortunately it
lacks documentation (at least in English) so you need to read
source and ask for support in mail list.

-- 
Denis S. Otkidach
http://www.python.ru/      [ru]





More information about the Python-list mailing list