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

Adding In-Memory cache support for CosmosDB #2015

Merged
merged 21 commits into from
Mar 7, 2024

Conversation

neeraj-sharma2592
Copy link
Contributor

@neeraj-sharma2592 neeraj-sharma2592 commented Feb 6, 2024

Why make this change?

Adding In-Memory cache support for CosmosDB. Closes #1884

What is this change?

Introduced a new generic method GetOrSetAsync for getting and setting cached item.
Using GetOrSetAsync for caching Cosmosdb query result.

How was this tested?

  • Integration Tests
    Added integration tests using Mock Func execution by DabCacheService.GetOrSetAsync.
    Performed manual testing of caching behavior. Had to manually override enablecaching and TTL since config changes were throwing an error. Will perform another round of tests by enabling caching from configuration before merging the PR.

@neeraj-sharma2592
Copy link
Contributor Author

neeraj-sharma2592 commented Feb 6, 2024

  • Perform manual test by enabling caching from configuration file

@seantleonard
Copy link
Contributor

seantleonard commented Feb 7, 2024

There are some changes i need to cherry pick from 0.10 release branch to fix this behavior:

Had to manually override enablecaching and TTL since config changes were throwing an error.

@neeraj-sharma2592
Copy link
Contributor Author

/azp run

Copy link

Azure Pipelines successfully started running 3 pipeline(s).

@neeraj-sharma2592
Copy link
Contributor Author

/azp run

Copy link

Azure Pipelines successfully started running 3 pipeline(s).

@neeraj-sharma2592 neeraj-sharma2592 force-pushed the dev/neesharma/cosmos-in-memory-cache branch from 25502f6 to 74aaae0 Compare February 13, 2024 13:38
@neeraj-sharma2592
Copy link
Contributor Author

/azp run

Copy link

Azure Pipelines successfully started running 3 pipeline(s).

@neeraj-sharma2592
Copy link
Contributor Author

/azp run

Copy link

Azure Pipelines successfully started running 3 pipeline(s).

Copy link
Contributor

@seantleonard seantleonard left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

still need to go through tests.

src/Core/Resolvers/CosmosQueryEngine.cs Show resolved Hide resolved
src/Core/Services/Cache/DabCacheService.cs Show resolved Hide resolved
@neeraj-sharma2592
Copy link
Contributor Author

/azp run

Copy link

Azure Pipelines successfully started running 2 pipeline(s).

src/Core/Resolvers/CosmosQueryEngine.cs Show resolved Hide resolved
src/Service.Tests/CosmosTests/QueryTests.cs Outdated Show resolved Hide resolved
@sourabh1007 sourabh1007 force-pushed the dev/neesharma/cosmos-in-memory-cache branch from 9b8eeb4 to 9c7bcf1 Compare March 6, 2024 17:51
@sourabh1007
Copy link
Contributor

/azp run

@sourabh1007 sourabh1007 enabled auto-merge (squash) March 6, 2024 17:51
Copy link

Azure Pipelines successfully started running 2 pipeline(s).

@neeraj-sharma2592
Copy link
Contributor Author

/azp run

Copy link

Azure Pipelines successfully started running 2 pipeline(s).

@neeraj-sharma2592
Copy link
Contributor Author

/azp run

Copy link

Azure Pipelines successfully started running 2 pipeline(s).

@sourabh1007 sourabh1007 merged commit 22c0ea5 into main Mar 7, 2024
9 checks passed
@sourabh1007 sourabh1007 deleted the dev/neesharma/cosmos-in-memory-cache branch March 7, 2024 09:33
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

Successfully merging this pull request may close these issues.

In Memory Cache - Cosmos
5 participants