Since most of this data doesn't change very often, we can aggressively cache API endpoints in CloudFront. It would be good to get this automated though from the PlanetScale side, so that whenever we update the DB, we send an invalidation request to CloudFront. (like we do when content in Contentful changes)
Bonus points for being able to tell which table was updated, and update that resource specifically. Worst case scenario would be to just invalidate everything. (which may be desirable since a lot of the content could / might be relational)
Should also document this as well somewhere.
Since most of this data doesn't change very often, we can aggressively cache API endpoints in CloudFront. It would be good to get this automated though from the PlanetScale side, so that whenever we update the DB, we send an invalidation request to CloudFront. (like we do when content in Contentful changes)
Bonus points for being able to tell which table was updated, and update that resource specifically. Worst case scenario would be to just invalidate everything. (which may be desirable since a lot of the content could / might be relational)
Should also document this as well somewhere.