Skip to content

Feature/add cache time#88

Merged
k-ode merged 3 commits intomainfrom
feature/add-cache-time
Apr 16, 2025
Merged

Feature/add cache time#88
k-ode merged 3 commits intomainfrom
feature/add-cache-time

Conversation

@k-ode
Copy link
Contributor

@k-ode k-ode commented Apr 15, 2025

No description provided.

@k-ode k-ode requested a review from Copilot April 15, 2025 19:11
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR introduces caching functionality for MST queries by adding cacheKey and cacheTime support. Key changes include:

  • Adding new tests to validate cache behavior.
  • Extending CacheOptions through hooks, create, and query handler modules.
  • Implementing caching logic in QueryStore and updating QueryClient defaults.

Reviewed Changes

Copilot reviewed 6 out of 8 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
packages/mst-query/tests/mstQuery.test.tsx Adds tests for cacheKey and cacheTime functionality.
packages/mst-query/src/hooks.ts Extends query options with CacheOptions.
packages/mst-query/src/create.ts Updates setData signature to accept cache options.
packages/mst-query/src/QueryStore.ts Introduces a dedicated cache map and timeout mechanism for query data caching.
packages/mst-query/src/QueryClient.ts Adds a cacheTime default to the queryOptions.
packages/mst-query/src/MstQueryHandler.ts Adjusts query flow and data hydration to integrate cache logic using CacheOptions.
Files not reviewed (2)
  • packages/mst-query/package-lock.json: Language not supported
  • packages/mst-query/package.json: Language not supported

@k-ode k-ode requested a review from jonasdunkel April 15, 2025 19:15
@k-ode k-ode merged commit 0b9b3a7 into main Apr 16, 2025
1 check passed
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.

2 participants