addresscloud/terraform-aws-tile-service

Support caching of options parameters?

tomasholderness opened this issue · 1 comments

The folks at flatgeobuff recommend caching OPTIONS requests for speed 1. Questions:

  1. in the context of API GW, where OPTIONS requests are already mocks, does caching improve performance?
  2. can this simply be enabled by changing the cache setting verbs? E.g. replacing GET with "*" here:
    method_path = "v1/{tileset}/{version}/{z}/{x}/{y}/GET"

    and here for tilefiles:
    method_path = "v1/{filekey}/GET"

Footnotes

  1. https://flatgeobuf.org/#optimizing-remotely-hosted-flatgeobufs

I tested this quite extensively and was unable to see a difference when caching was enabled for the OPTIONS methods; the tile service uses mocked responses for the OPTIONS values which mean they are effectively cached by APIGW already. For reference here is the page with details on API GW caching: https://docs.aws.amazon.com/apigateway/latest/developerguide/api-gateway-caching.html#override-api-gateway-stage-cache-for-method-cache