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

Clear-cache: include system-cache #135

Open
Dominic-Marcelino opened this issue Jan 13, 2025 · 2 comments
Open

Clear-cache: include system-cache #135

Dominic-Marcelino opened this issue Jan 13, 2025 · 2 comments
Labels
enhancement New feature or request

Comments

@Dominic-Marcelino
Copy link

The pull, diff and push commands each clear the cache at the beginning.

async clearCache() {
const directus = await this.get();
await directus.request(clearCache());
this.logger.debug('Cache cleared');
}

However this does not clear the system-cache. Due to this it might fetch incorrect data related to the schema.
In my case for example, I ran into an issue as it fetched old FK-Constraint names.

To prevent such issues, I suggest clearing the system-cache too. However, this option isn't available in the SDK yet, but should be coming soon: directus/directus#24397

@EdouardDem
Copy link
Member

Thanks @Dominic-Marcelino for the highlight. I will implement this once your PR is merged to Directus.

@EdouardDem EdouardDem added the enhancement New feature or request label Jan 16, 2025
@Dominic-Marcelino
Copy link
Author

Thanks @Dominic-Marcelino for the highlight. I will implement this once your PR is merged to Directus.

It's merged and released 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants