jetbridge / cdk-nextjs

Deploy a NextJS application using AWS CDK
https://constructs.dev/packages/cdk-nextjs-standalone
Apache License 2.0
273 stars 45 forks source link

fix: fixes ssg cache files not being used by open-next cache handler #150

Closed kevin-mitchell closed 11 months ago

kevin-mitchell commented 11 months ago

Closes #149

This will align the cache files generated at deploy time and the open-next cache handler so SSG files are actually looked at.

Fixes #149

bestickley commented 11 months ago

Added some more comments to code. NEXTJS_CACHE_DIR and CACHE_BUCKET_KEY_PREFIX are not the same. The format is where open-next writes the cached files to (on the computer that is building the nextjs site), the latter is where in the NextjsStaticAssets S3 bucket we store the cached assets.

kevin-mitchell commented 11 months ago

OK, after that little confusion there I think things are now correct. Just deployed, everything is deployed to _cache, and the environment key is correct still.

Screenshot 2023-10-23 at 10 32 08 PM