go-cache icon indicating copy to clipboard operation
go-cache copied to clipboard

Example how to save cache in file and reload using gob an c.Items() ?

Open alidevhere opened this issue 2 years ago • 1 comments

Hii !! I need to save cache in file and then reload when restart. I didn't find any help. Can you please give an example how to do that ?

alidevhere avatar May 25 '23 14:05 alidevhere

use gob.register your struct. cache.savefile() to save and cache.loadfile() to load

Septrum101 avatar Jun 24 '23 22:06 Septrum101