手撸一个本地缓存

95 阅读1分钟

缓存接口设计

image.png

image.png 不要范型 上一层 再包一个范型

基于map实现

image.png

手写 get set delete

过期问题

image.png

image.png

image.png