Abstract. Certain types of database-backed web sites heavily utilize userdefined functions in SQL queries. Unfortunately, existing web proxy caching schemes can not handle these functions. In order to enable proxy caching for such web sites, we propose a template-based proxy caching framework, a function proxy, for table-valued functions. In our framework, function templates are registered with the proxy so that the proxy can answer new queries based on previously cached data in collaboration with the original web site. We identify a common class of function-embedded queries and present several active caching schemes for them. Our experiments with real web sites show the feasibility and usefulness of the function proxy. Additionally, we find that cache-intersecting queries may not be worth handling at the proxy and that containment-based active caching is efficient and practical.