On Thu, Mar 03, 2005 at 09:33:42AM -0800, Cory Dodt wrote:
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
+1 performance-enhancing drugs.
BTW, is there an example of using cached anywhere?
weever has some example for tags cached. The hard rand.Page cache is much simpler to use, my code looks like this: LIFETIME = 60 class forever_cached_page_class(rend.Page): cache = True class cached_page_class(forever_cached_page_class): lifetime = LIFETIME class myclass(rend.Page, cached_page_class): ... class myclass(rand.Page, forever_cached_page_class): ... If the renderings are static you can cache forever, mine are dynamic over time, so I more frequently use multiple inheritance with cached_page_class. Trivial isn't it? It has taken me _minutes_ to cache my whole site. Try w/ cache and w/o cache ab2 -n 1000 -c 100 localhost:8080/ Still there are parts where I don't cache anything (since I don't want to complicate things too much), and for those the optimizations in compy should payoff significantly. Thanks!