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

Introducing QueryCacheBuilder #61

Merged
merged 1 commit into from
Aug 11, 2024
Merged

Introducing QueryCacheBuilder #61

merged 1 commit into from
Aug 11, 2024

Conversation

ogaclejapan
Copy link
Contributor

Instead of directly referencing TimeBasedCache, we have now implemented a wrapped QueryCache type using the QueryCacheBuilder, which provides the functionality to pre-build the cache and simplifies the process.

val queryCache = QueryCacheBuilder {
    put(GetUserKey.Id("1"), User("1", ..)),
    put(..)
}
val policy = SwrCachePolicy(
    ..,
    queryCache = queryCache,
)

Instead of directly referencing `TimeBasedCache`, we have now implemented a wrapped `QueryCache` type using the
`QueryCacheBuilder`, which provides the functionality to pre-build the cache and simplifies the process.
@ogaclejapan ogaclejapan added the enhancement New feature or request label Aug 11, 2024
@ogaclejapan ogaclejapan merged commit f7d94a2 into main Aug 11, 2024
1 check passed
@ogaclejapan ogaclejapan deleted the query-cache branch August 11, 2024 05:09
@ogaclejapan ogaclejapan mentioned this pull request Aug 11, 2024
@github-actions github-actions bot mentioned this pull request Sep 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant