Open Morsey187 opened 1 year ago
@jhancock532 I've found it difficult to follow the current setup for the serverless functions (peopleHR endpoint), so would be ideal if you could verify that removing this won't causes issues else where, i.e. it's not being relied on for something else.
Description of Changes Made
The PR removes code used to cache (read/write) PeopleHR requests into a folder, and instead calls the API directly for every request.
The current caching method used for PeopleHR is no longer supported (results in a read-only file error). We could fix this however, removing the file caching seems to be a better option, this type of file caching does not seem to be offically supported by Vecel/Next.js (ref) and will likely result in similar issues in the future (in terms of upgrades and changes to Vercel).
Removing the file caching will result in a few extra requests to peopleHR when job pages need to revalidate, however the changes we also reduce a lot of technical debt.
How to Test
Run Next.js in production, test Next.js's page caching works if peopleHR requests were to fail.
[Link to changes made on preview site]()
MR Checklist