Skip to content

Cache buster in dev #6587

@MengLinMaker

Description

@MengLinMaker

Placing Cloudfront in front of ApiGateway is a good practice.

But testing cache behaviour in dev is a pain when you need to log into AWS console to invalidate cache.

But invalidating cache takes a while, is there a faster solution?

Other solutions:

1. Use AWS cli to bust cache?

aws cloudfront create-invalidation --distribution-id CLOUDFRONT_DISTRIBUTION_ID --paths "/*"

Then SST does not need to change.

2. Don't cache on dev

For expensive SQL queries, this greatly increases database load as local host tends to not cache.
SST does not need to change.

3. Override cache policy on dev

Provide option to override cache policy on dev through ENV or Router component?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions