s2graph icon indicating copy to clipboard operation
s2graph copied to clipboard

Make Graph to accept user provided Cache implementation.

Open SteamShon opened this issue 10 years ago • 1 comments

Current implementation only use local cache. it would be better to abstract cache interface and let user to implement their own cache.

for example, if user want to use redis cluster for cache, then by implementing Cache trait, user should be able to use their redis cluster as cache.

I think It would be better to provide Cache trait and only s2core use common cache trait so user can override local cache if they want to use different cache solution.

SteamShon avatar Nov 24 '15 01:11 SteamShon

Not quite finished yet.

I think we need to refactor code and change Cache Trait as following.

Key: QueryRequest Value: Seq[QueryResult]

also I think Cache Trait should contains following methods.

  1. get
  2. put
  3. function QueryRequest => Any

SteamShon avatar Nov 25 '15 08:11 SteamShon