Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Introduce second level memory cache for all types of cache. #148

Open
yuriyz opened this issue Sep 12, 2019 · 1 comment
Open

Introduce second level memory cache for all types of cache. #148

yuriyz opened this issue Sep 12, 2019 · 1 comment
Assignees
Milestone

Comments

@yuriyz
Copy link
Contributor

yuriyz commented Sep 12, 2019

One idea which me and @yurem discussed is to introduce 2 levels cache:

  1. first level memory (bound to single node)
  2. current cache implementation, provider with REDIS, MEMCACHED, NATIVE.

Get entry by key:

  1. First check in-memory, if it's there return
  2. If not in-memory, call second level cache (currently configured CacheProvider, e.g. NATIVE, REDIS, MEMCACHED).

Idea is on first level keep most used cache objects, and with memory speed is maximum, however that first level of cache is not going to be replicated. We should think whether it will not introduce problems in cluster.

@yuriyz yuriyz added this to the 4.2 milestone Sep 12, 2019
@yuriyz yuriyz self-assigned this Sep 12, 2019
@yuriyz yuriyz changed the title Introduce second level memory cache for types of cache. Introduce second level memory cache for all types of cache. Sep 12, 2019
@yurem
Copy link
Contributor

yurem commented Sep 12, 2019

We can add TTL to each object type in first level cache
For example 30 seconds for attributes and scopes. This means that each node will evict these objects withing 30 seconds which is ok for this object type.

@yuriyz yuriyz modified the milestones: 4.2, 4.3 May 26, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants