8

My endpoint method generates a different response for each invocation regardless of the parameter list. I often see my client call the endpoint with the same parameter list, and the front end instance returns a cached response.

In the official documentation I read that ApiMethod#cacheControl has been deprecated. On the other hand, the documentation says that the @Api-scopped annotation @ApiCacheControl has not been implemented yet so adding the following makes no difference.

cacheControl = @ApiCacheControl(
        type = ApiCacheControl.Type.NO_CACHE
    )

To make things easier, the documentation also says that

public @interface ApiCacheControl

Annotation for API cache control configuration. Note that the API frontend itself may act as a caching proxy.

Given the current state of the API what's considered best practice for enforcing cache control?

Community
  • 1
  • 1
mobilekid
  • 1,629
  • 5
  • 19
  • 27
  • Did you find a solution? Would be great if you posted an answer – shaylevi2 Feb 23 '16 at 02:28
  • Possible duplicate of [Caching of Google Cloud Endpoints?](https://stackoverflow.com/questions/40579015/caching-of-google-cloud-endpoints) – ZUKINI Dec 20 '18 at 00:53

0 Answers0