Is it possible to set cache-control headers when using AppEngine's ProtoRPC library?

If I query my service I can see it is currently setting a no-cache header:

HTTP/1.1 200 OK
content-type: application/json
Cache-Control: no-cache
Expires: Fri, 01 Jan 1990 00:00:00 GMT
Content-Length: 2
Server: Development/2.0
Date: Thu, 20 Feb 2014 11:47:48 GMT

I haven't been able to find any way to change it, although the Endpoints library does seem to allow control of the cache headers, and I know it's built on ProtoRPC, so presumably it can be done.

有帮助吗?

解决方案

To answer my own question, it seems this is not possible.

There are hooks in the Cloud Endpoints code to change the cache-control, but they are stubs, not yet implemented: https://code.google.com/p/googleappengine/issues/detail?id=9042

ProtoRPC does not yet support it either: https://groups.google.com/forum/#!topic/google-appengine-python/l43R6w_3mpM

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top