TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Serverless Architecture – All you need to know about caching

25 点作者 suresh70超过 5 年前

2 条评论

tayleeganj超过 5 年前
So I&#x27;ve got a site on S3 Cloudfront. I have an API gateway origin. I need to call an external API. The auth works by constructing a JWT, POSTing it to a token endpoint, and including that access token in requests to the API. I need a way to cache the access token.<p>1. Call API with Lambda proxy with the access token stored as a global variable outside the handler. Would be reused but like article mentions not guaranteed and can miss often. 2. Store access token client side (cookie). This would require one call per client even if the access token already generated. 3. Store access token externally (S3 or secrets manager?). Latency would increase, but could be combined with #1.<p>Any other way to do this?
评论 #21173838 未加载
ahawkins超过 5 年前
2 modal opt-in popups. 1 is standard. 2 is really pushing it.