Conversation
Contributor
Greptile OverviewGreptile SummaryAdded a new CLI command Key Changes:
Recommendations:
Confidence Score: 4/5
Important Files Changed
Sequence DiagramsequenceDiagram
participant User
participant FlatCacheInvalidateCommand
participant ActiveOrSuspendedWorkspacesMigrationCommandRunner
participant ValidationLogic
participant UtilityFunctions
participant WorkspaceManyOrAllFlatEntityMapsCacheService
participant WorkspaceCacheService
User->>FlatCacheInvalidateCommand: Execute command with --metadataName or --all
FlatCacheInvalidateCommand->>FlatCacheInvalidateCommand: parseMetadataName() / parseAll()
FlatCacheInvalidateCommand->>FlatCacheInvalidateCommand: runMigrationCommand()
alt Missing both --all and --metadataName
FlatCacheInvalidateCommand->>User: Error: Either --all or --metadataName required
end
FlatCacheInvalidateCommand->>ValidationLogic: validateAndExpandMetadataNames()
ValidationLogic->>ValidationLogic: Check against ALL_METADATA_NAME
alt Invalid metadata names
ValidationLogic->>User: Error: Invalid metadata names
else Valid
ValidationLogic-->>FlatCacheInvalidateCommand: Return AllMetadataName[]
end
FlatCacheInvalidateCommand->>UtilityFunctions: computeFlatMapsKeysWithRelated()
UtilityFunctions->>UtilityFunctions: getMetadataRelatedMetadataNames()
UtilityFunctions->>UtilityFunctions: getMetadataFlatEntityMapsKey()
UtilityFunctions-->>FlatCacheInvalidateCommand: Return flat maps keys
FlatCacheInvalidateCommand->>ActiveOrSuspendedWorkspacesMigrationCommandRunner: super.runMigrationCommand()
loop For each workspace
ActiveOrSuspendedWorkspacesMigrationCommandRunner->>FlatCacheInvalidateCommand: runOnWorkspace()
FlatCacheInvalidateCommand->>WorkspaceManyOrAllFlatEntityMapsCacheService: invalidateFlatEntityMaps()
WorkspaceManyOrAllFlatEntityMapsCacheService->>WorkspaceCacheService: invalidateAndRecompute()
WorkspaceCacheService-->>WorkspaceManyOrAllFlatEntityMapsCacheService: Cache invalidated
WorkspaceManyOrAllFlatEntityMapsCacheService-->>FlatCacheInvalidateCommand: Complete
FlatCacheInvalidateCommand->>User: Log: Successfully flushed cache for workspace
end
ActiveOrSuspendedWorkspacesMigrationCommandRunner-->>User: Command complete
|
Contributor
|
🚀 Preview Environment Ready! Your preview environment is available at: http://bore.pub:5259 This environment will automatically shut down when the PR is closed or after 5 hours. |
martmull
approved these changes
Jan 26, 2026
1 similar comment
etiennejouan
pushed a commit
that referenced
this pull request
Jan 27, 2026
# Introduction A command allowing to invalidate flat cache entries. Extends the active or suspended workspace coverage. ## Args ### --metadataName If provided will invalidate metadata and related metadata cache entry ( can be repeated see usage ) ### --all-metadata Will invalidate all metadata entries ## Usage example ``` npx nx command twenty-server cache:flat-cache-invalidate --metadataName viewFilter --metadataName objectMetadata ``` ``` npx nx command twenty-server cache:flat-cache-invalidate --all-metadata -w 0000-0000-0000-0000 ```
camilo-agudelo-uma
pushed a commit
to innovation-grupo-uma/twenty-uma
that referenced
this pull request
Feb 2, 2026
# Introduction A command allowing to invalidate flat cache entries. Extends the active or suspended workspace coverage. ## Args ### --metadataName If provided will invalidate metadata and related metadata cache entry ( can be repeated see usage ) ### --all-metadata Will invalidate all metadata entries ## Usage example ``` npx nx command twenty-server cache:flat-cache-invalidate --metadataName viewFilter --metadataName objectMetadata ``` ``` npx nx command twenty-server cache:flat-cache-invalidate --all-metadata -w 0000-0000-0000-0000 ```
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.
Introduction
A command allowing to invalidate flat cache entries. Extends the active or suspended workspace coverage.
Args
--metadataName
If provided will invalidate metadata and related metadata cache entry ( can be repeated see usage )
--all-metadata
Will invalidate all metadata entries
Usage example