我们需要设计一个文件缓存系统,该系统可以指定缓存的最大值(单位为字节)。文件缓存系统支持两种操作:
当缓存空间不足以存放新的文件时,系统需要根据一定的规则删除文件,直到剩余空间满足新文件的大小。删除规则如下:
请设计一个文件缓存系统,该文件缓存系统可以指定缓存的最大值(单位为字节)。
文件缓存系统有两种操作:
存储文件(put)
读取文件(get)
Scan the QR code below with WeChat to sign in
First-time scan will create your account automatically
请使用微信扫描下方二维码完成注册