feat: (SSR) define cacheSize in memory units#1575
Open
kpawelczak wants to merge 1 commit intodevelopfrom
Open
Conversation
kpawelczak
commented
Mar 10, 2025
| ```ts | ||
| { | ||
| cacheSize: 3000, | ||
| cacheLimit: getCacheLimitInBytes(3, 'GB'), |
Contributor
Author
There was a problem hiding this comment.
getCacheLimitInBytes changed to convertToBytes
kpawelczak
commented
Mar 10, 2025
| - When the cache exceeds the set `cacheLimit`, the system will begin to evict the oldest cache entries to bring the total memory usage below the limit. This is typically done by removing the least recently used (LRU) entries first. | ||
| - The cache eviction ensures that the system maintains a balance between cache size and memory usage, without allowing the cache to become unmanageably large. | ||
|
|
||
| - **Granularity**: The cache limit works with the `cacheSizeInBytes` feature flag, enabling more precise control over the cache's memory consumption in bytes instead of just the number of entries. |
Contributor
Author
There was a problem hiding this comment.
cacheSizeInBytes -> cacheLimitInBytes
kpawelczak
commented
Mar 10, 2025
| ... | ||
| ssrFeatureToggles: { | ||
| ... | ||
| cacheSizeInBytes: true, |
Contributor
Author
There was a problem hiding this comment.
cacheSizeInBytes -> cacheLimitInBytes
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
ticket: CXSPA-8964