-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
[FEATURE] Add multiple insert and delete functionality for in-memory cache #2373
Comments
I want to try this. |
Sure @rohithsai1904, I'll assign this to you. Let us know in case you have any questions, on this issue thread or on our Discord server. |
Hey @rohithsai1904 , |
It would be great if there are more examples with context of uses/use-cases |
hey @agatekartik you can check this code hyperswitch/crates/router/src/db/merchant_account.rs Lines 342 to 362 in 7fb5c04
Here we are redacting two keys and making two calls to |
Hey @rohithsai1904 , |
Sorry, I was a little busy with some college works.I haven't started
anything yet but I surely want to work on this.
Thank you.
…On Tue, Oct 10, 2023, 14:54 Vedant Khairnar ***@***.***> wrote:
Hey @rohithsai1904 <https://github.com/rohithsai1904> ,
Just checking in - are you working on it or shall we consider reassigning
it to someone else?
—
Reply to this email directly, view it on GitHub
<#2373 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AQZJ22EH46K66KPEJHSJNPTX6UH5FAVCNFSM6AAAAAA5IDNSICVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTONJUHAYDGMRTGM>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
Sure @rohithsai1904 |
Is there any documentation or architecture kind of a thing related to the issue? (https://github.com/juspay/hyperswitch/tree/main/docs)Got it... |
@rohithsai1904 There isn't an architecture doc for the in-memory cache specifically, but I'll provide you some context about how the in-memory cache is used. We have 3 levels of persistence, the in-memory cache, Redis and a PostgreSQL database, much similar to the memory hierarchy you'd see on a computer (CPU cache, RAM and disk respectively). The database is our persistent storage, with items being temporarily stored in Redis and in-memory cache to decrease read latencies. Among these items being cached, the ones that are not expected to be frequently updated (such as merchant account, merchant key store, API keys, merchant connector accounts) are stored in the in-memory cache. And when an item in the in-memory cache needs to be updated, that item is invalidated (removed) from the cache. As of now, we have support for inserting items to and deleting items from the in-memory cache one at a time. This issue involves introducing support for inserting and deleting multiple items at once. Let us know if you have any more questions. |
Hey @rohithsai1904 |
https://github.com/juspay/hyperswitch/blob/main/crates/storage_impl/src/redis/cache.rs Correct me if im wrong....is there any other file for in memory cache?... or is this just the redis cache? |
Yeah you have to make change there @rohithsai1904 . |
Feature Description
There are few cases where we insert/delete multiple keys in the cache. So add a function where it takes multiple key values and insert and delete it in the cache.
Possible Implementation
We can have a struct like this and make modify enum
CacheKind
to acceptCacheValues
.Have you spent some time checking if this feature request has been raised before?
Have you read the Contributing Guidelines?
Are you willing to submit a PR?
None
The text was updated successfully, but these errors were encountered: