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

Set cache metadata version to infinite TTL #8507

Merged
merged 1 commit into from
Nov 14, 2024

Conversation

Weiko
Copy link
Member

@Weiko Weiko commented Nov 14, 2024

Context

To avoid having a corrupt metadata version, we want to remove TTL for that key.

Test

Screenshot 2024-11-15 at 00 02 05

Copy link
Contributor

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

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

PR Summary

This PR modifies the workspace cache storage service to prevent metadata version corruption by implementing an infinite TTL for metadata version cache entries.

  • Added TTL_INFINITE = 0 constant in /packages/twenty-server/src/engine/workspace-cache-storage/workspace-cache-storage.service.ts
  • Modified setMetadataVersion() to use TTL_INFINITE parameter for cache entries
  • Cache entries for metadata version will now persist indefinitely until manually cleared via flush()

1 file(s) reviewed, no comment(s)
Edit PR Review Bot Settings | Greptile

@charlesBochet charlesBochet merged commit cfe3515 into main Nov 14, 2024
16 checks passed
@charlesBochet charlesBochet deleted the c--set-cache-metadata-version-to-infinite-ttl branch November 14, 2024 23:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants