actually, unless something changed on on GAE, select caching does not work because the rows object is not picklable.
the @cache decorator caches the dict that you return to the view, not the rendered view. if something in that dict is not picklable (say a rows object) the cache will fail. anthony's first suggestion should work in all cases.

