bluele / gcache

An in-memory cache library for golang. It supports multiple eviction policies: LRU, LFU, ARC
MIT License
2.6k stars 271 forks source link

how to share between multiple processes? #68

Closed juneng603 closed 3 years ago

juneng603 commented 4 years ago

Hi, gcache developers!!

I hope to use a gcache in multiprocesses. By the way, I'm thinking about how I can share a cache store in every process (there is a single parent process and multiple child processes).

When I wrote C++ before, I used shared memory to share it between processes, and I'm working on a project to move to Golang, and I'm thinking about a good way.

I'm thinking about gcache, is there an appropriate way?

leezhu commented 4 years ago

I think you can realize it use goroutine other than mutiprocess. Or Redis /memcache fit you

hope to help you

bluele commented 3 years ago

Currently, gcache only supports multiple goroutine in a single process.