-
Notifications
You must be signed in to change notification settings - Fork 77
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Nextjs 的 Image 如何关闭本地缓存 #55
Comments
目前我采用 img 标签,替换 Nextjs Image 组件,实现不经过 nextjs 缓存,直接访问图床地址。 不知道是否为最优方案 |
不是很明白。 如果图片会被缓存到浏览器,不是可以减轻服务器压力吗?请求的次数降低了呀。 |
有试过这个配置项吗? |
@zhangzhonghe 目前咱们网站的图片,都是放在图床/CDN(upyun) 如果是用 next.js 的 Image 组件,会拉取 图床的图片到我们自己的服务器,然后图片的请求地址就转接到咱们自己的服务器了。 从而增加了 HelloGitHub 网站所在服务器的负载,而且图片比较占带宽。 有试过这个配置项吗? 这个配置应该是设置图片缓存失效的时间,感觉用处不大。 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Nextjs 的 image 会缓存 src 地址的图片,但是这样
我看了 next 的文档没找到怎么关闭这个缓存。😢
The text was updated successfully, but these errors were encountered: