硬盘持久化
配置文件
global
master-worker
nuster cache on data-size 10m dir /tmp/cache
nuster nosql on data-size 10m dir /tmp/nosql
backend be
nuster cache on
nuster rule off disk off ttl 1m if { path_beg /disk-off }
nuster rule only disk only ttl 1d if { path_beg /disk-only }
nuster rule sync disk sync ttl 1h if { path_beg /disk-sync }
nuster rule async disk async ttl 2h if { path_beg /disk-async }
nuster rule others ttl 100
/disk-off
仅保存在内存/disk-only
仅保存在硬盘/disk-sync
保存至内存和硬盘后返回给客户端/disk-async
保存至内存后立即换回给客户端,内存数据会在一定时间后被缓存至硬盘- 其他的所有请求都仅保存在内存