amazon-s3 - dask.s3fs 是否真的使用缓存?
问题描述
当您调用S3FileSystem().open(..., fill_cache=True)
它时,它看起来仍然进入 S3,仍然进行 ssl 握手等。这是它不缓存的预期行为吗?
解决方案
该fill_cache
选项具有非常特定的含义
If seeking to new a part of the file beyond the current buffer, with this True, the buffer will be filled between the sections to best support random access. When reading only a few specific chunks out of a file, performance may be better if False.
即,只有当您在文件保持打开状态时随机访问文件的某些部分时,它才会有所不同。无论如何,都需要初始 SSL 连接/握手,唯一可能改变的是请求的字节的确切范围。
另请注意,s3ss 使用 boto Session
,因此 SSL 连接通常应在可能的情况下进行池化和重用。
推荐阅读
- pouchdb - 从客户端删除 PouchDB 文档而不清除浏览器
- reactjs - 在 React 中更改受控输入的值
- json - 如何通过 sed 命令将单行 json 转换为多行
- excel - vba 图表 #n/a 隐藏
- javascript - jQuery单击事件未绑定到元素
- redis - redis-data.rdb 不会运行/损坏(可能)
- javascript - JSON将数组插入到具有相同键名的对象中
- math - (p ∧ q) ∧ (p ⇒ ¬q) 证明矛盾?
- vue.js - 如何避免 vue.js 属性/道具中的行太长?
- pentaho - 如何在 Pentaho 中的转换内的步骤之间传递变量