Skip to content

feat: (SSR) define cacheSize in memory units#1575

Open
kpawelczak wants to merge 1 commit intodevelopfrom
feat/CXSPA-8964
Open

feat: (SSR) define cacheSize in memory units#1575
kpawelczak wants to merge 1 commit intodevelopfrom
feat/CXSPA-8964

Conversation

@kpawelczak
Copy link
Contributor

ticket: CXSPA-8964

```ts
{
cacheSize: 3000,
cacheLimit: getCacheLimitInBytes(3, 'GB'),
Copy link
Contributor Author

Choose a reason for hiding this comment

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

getCacheLimitInBytes changed to convertToBytes

- 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.
Copy link
Contributor Author

Choose a reason for hiding this comment

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

cacheSizeInBytes -> cacheLimitInBytes

...
ssrFeatureToggles: {
...
cacheSizeInBytes: true,
Copy link
Contributor Author

Choose a reason for hiding this comment

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

cacheSizeInBytes -> cacheLimitInBytes

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.

1 participant