Closed dvictory closed 1 year ago
The cachePolicy isn't be set correctly here: https://github.com/sladg/nextjs-lambda/blob/master/lib/cdk/utils/cfnDistro.ts#L62 My deployment does not get set to 0. When I go into AWS console it will not let me change it to 0 either because the "max cannot be less then the default", I think we need to add:
minTtl: Duration.seconds(0), defaultTtl: Duration.seconds(0),
to the code to disable caching. Without it, my API calls are returning cached/stale data.
Good catch! Wanna open PR with the change? I can get to it by the end of week myself
Let me see if I can find the time ;)
The cachePolicy isn't be set correctly here: https://github.com/sladg/nextjs-lambda/blob/master/lib/cdk/utils/cfnDistro.ts#L62 My deployment does not get set to 0. When I go into AWS console it will not let me change it to 0 either because the "max cannot be less then the default", I think we need to add:
to the code to disable caching. Without it, my API calls are returning cached/stale data.