angular - 如何在响应标头中设置缓存控制
问题描述
如何使用在响应标头中设置缓存控制Apollo-Server
?
我使用 Angular 作为 FE 和 Graphql Module & Apollo Client 作为我的应用程序的 BE。
以下是响应标头。我不确定这个标题是从哪里应用的。
我想设置我的自定义标题,我该怎么做?
下面是我的示例代码。
export default new ApolloServer({
schema,
context,
playground: config.isDevelopment,
uploads: {
maxFileSize: 3000000, // 3 MB
maxFiles: 2
},
cacheControl: true,
persistedQueries: {
cache: apolloCacheInstance
}
});
解决方案
推荐阅读
- html - 动态加载具有依赖项的 Angular 组件
- python - Spyder 5.0.0 注释和缩进按钮丢失
- sql-server - 保护由多个桌面应用程序直接调用的 SQL Azure db
- twitter-bootstrap - 在引导程序 4 中,如何让行或列在父容器内扩展到全高?
- java - 使用 RestTemplate 将 JSON 字符串(包括不同的 lenient)转换为 Java 类
- java - gradle 的问题 - android studio
- mysql - vagrant 共享存储 - docker compose - 容器 mysql - 持久卷 - 未显示
- heroku-postgres - 当我们 postgres 是版本 10 时,pg_dump 是 heroku 上的版本 13
- python - 将参数解析为字典 argparse
- android - Flutter:按下时如何调用 Future 函数