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

CacheEvict on CachePut is optional property and multiple cache region entities are evicted together. #7

Closed
rica-v3 opened this issue Feb 28, 2021 · 3 comments
Assignees

Comments

@rica-v3
Copy link
Member

rica-v3 commented Feb 28, 2021

Is your feature request related to a problem? Please describe.

In some cases, a cache entity might be necessarily evicted on cache put.

Describe the solution you'd like
An cachePut operation does evict a current cache entity prior to putting the entity if exists.
The cacheEvict on cachePut is optionally executed only when configured.
The default behavior is not to not evict an entity on cachePut.

Multiple cache region entities are evicted altogether.
an entity on region A mapped by id#1
an entity on region B also mapped by id#1

When the entity of A is put, the entity of B also is evicted because region A and region B are grouped and the cache key(id#1) is identical.

Additional context

An direct db update does not update cache entities, which leads data inconsistency between db and cache storage

@rica-v3 rica-v3 self-assigned this Feb 28, 2021
@rica-v3 rica-v3 changed the title CacheEvict on CachePut is optional property CacheEvict on CachePut is optional property and multiple cache region entities are evicted together. Feb 28, 2021
@rica-v3
Copy link
Member Author

rica-v3 commented Feb 28, 2021

The issue is now in development
PR: #8

@rica-v3
Copy link
Member Author

rica-v3 commented Mar 6, 2021

The PR #8 has been merged.
The next release would include the function. (1.2.0)

@rica-v3
Copy link
Member Author

rica-v3 commented Mar 11, 2021

Support "Multiple cache region entities are evicted altogether" at 1.2.0-RELEASE

@rica-v3 rica-v3 closed this as completed Mar 11, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant