Memory
Memory
内存后端是一种基于内存的后端。它不会持久保存数据 —— 如果需要持久化,请使用本地后端。
内存后端的行为类似于基于存储桶的远程存储(例如 S3)。由于它没有参数,你可以直接使用 :memory:
作为远程存储名称。
配置
如果你愿意,也可以使用 rclone config
像配置其他远程存储一样配置它:
No remotes found, make a new one?
n) New remote
s) Set configuration password
q) Quit config
n/s/q> n
name> remote
Type of storage to configure.
Enter a string value. Press Enter for the default ("").
Choose a number from below, or type in your own value
[snip]
XX / Memory
\ "memory"
[snip]
Storage> memory
** See help for memory backend at: https://rclone.cn/memory/ **
Remote config
Configuration complete.
Options:
- type: memory
Keep this "remote" remote?
y) Yes this is OK (default)
e) Edit this remote
d) Delete this remote
y/e/d> y
由于内存后端不会持久保存数据,因此它最适合用于测试,或者与 rclone 服务器或 rclone 挂载一起使用,例如:
rclone mount :memory: /mnt/tmp
rclone serve webdav :memory:
rclone serve sftp :memory:
修改时间和哈希值
内存后端支持 MD5 哈希值,并且修改时间的精度可达 1 纳秒。
受限文件名字符
内存后端会替换 默认的受限字符集。
高级选项
以下是内存后端(内存对象存储系统)特有的高级选项。
–memory-description
远程存储的描述。
属性:
- 配置项:description
- 环境变量:RCLONE_MEMORY_DESCRIPTION
- 类型:字符串
- 是否必需:否