cache2go icon indicating copy to clipboard operation
cache2go copied to clipboard

[Feature Request] Persisting cache data to disk

Open vzool opened this issue 6 years ago • 3 comments

Hi, I like this library because it is simple to use. But, I couldn't find a way to persisting cache to disk in order to retrieve cache after accidental application shutdown. Do you like to add this feature in the future?

Thanks

vzool avatar Jun 16 '19 11:06 vzool

Hi, I like this library because it is simple to use. But, I couldn't find a way to persisting cache to disk in order to retrieve cache after accidental application shutdown. Do you like to add this feature in the future?

Thanks

why don't you use Redis? I think this package is best used in the business layer cache.

chengyayu avatar Jun 17 '19 06:06 chengyayu

Yes, I think so. But, I prefer a simple solution and I just did it by swap this library with LevelDB as a cache. Thanks for your response ^_^

vzool avatar Jun 17 '19 08:06 vzool

I tend to agree: I think this is out of cache2go's scope. That said it would probably be fairly simple to (un)marshall the data, and I'm not opposed to a patch - should someone fancy tackling it.

muesli avatar Jun 17 '19 15:06 muesli