Currently, to refresh the emoji data cache, the entire project needs to be rebuilt. This is only done when new commits are applied to main, or manually. Rebuilds could be automated through Vercel chron tasks (probably), but this heavy-handed and unnecessary.
One solution could be to create an /api/refresh route which could trigger the refresh on POST and have a chron task issue a request to that endpoint at a chosen interval. With the limitations currently in place (bailing out if the data cache file is younger than an hour) it seems unlikely to be a target for abuse.
Currently, to refresh the emoji data cache, the entire project needs to be rebuilt. This is only done when new commits are applied to
main
, or manually. Rebuilds could be automated through Vercel chron tasks (probably), but this heavy-handed and unnecessary.One solution could be to create an
/api/refresh
route which could trigger the refresh on POST and have a chron task issue a request to that endpoint at a chosen interval. With the limitations currently in place (bailing out if the data cache file is younger than an hour) it seems unlikely to be a target for abuse.