Closed NikolozMS closed 2 months ago
@NikolozMS in SST both static assets and ISR cache are uploaded to the same s3 bucket. Assets to the _assets
folder, and cache to the _cache
folder. And the CloudFront S3 origin path points to the _assets
folder. You can do something similar. Here's the relevant code — https://github.com/sst/sst/blob/master/packages/sst/src/constructs/NextjsSite.ts#L346-L358
hello @fwang , thanks for response.
I want to deploy open-next
bundled project to AWS
, i read open-next documentation about architecture and how does ISR work, but I have some misunderstandings about how the whole process work
for example:
revalidation function
communicate with server function
if it doesserver function
check if the S3 cache
is outdated and how does it update the cacheWe use the cache handler properties by next to provide our own handler https://github.com/sst/open-next/blob/main/packages/open-next/src/adapters/cache.ts https://nextjs.org/docs/pages/building-your-application/deploying#configuring-caching
How does revalidation function communicate with server function if it does
https://open-next.js.org/inner_workings/isr
x-prerender-revalidate
header.How does server function check if the S3 cache is outdated
We check lastModified
from the S3 response
how does it update the cache
We just write the new data to S3
thanks fwang <3
Not really an issue, if you have more questions you should ask them on discord
guys i've bundled nextjs application with open-next and trying to host it on aws, but after bundling i have only .cache files for ISR (inside cache folder), there are not html files, how these files should be handled and what am i supposed to do ? (without sst) thanks in advanced