serverless-http icon indicating copy to clipboard operation
serverless-http copied to clipboard

Cache - help or insights

Open jrsarath opened this issue 7 months ago • 0 comments

So i been running few tests with serverless-http In aws I'm using API Gateway v1 - Rest api with lambda now when i enable caching on API Gateway, it behaves really weirdly So for instance, here are two paths:

  1. base_path/api/categories
  2. base_path/api/categories/category_id

so without caching all is well, working as expected but when i enable cache, this happens

  1. base_path/api/categories -> returns categories list
  2. base_path/api/categories/category_id -> returns category
  3. base_path/api/categories -> returns the category which was requested on earlier stage

sometimes its even vice-versa

So im not sure where to go from here, TTL is set to 300 api gateway config is /categories/{proxy+} -> ANY -> Lambda + serverless-http

any kind of guidance, insights will be helpfull

jrsarath avatar Jun 30 '24 10:06 jrsarath