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 Table Cache when running migrations #1531

Merged
merged 4 commits into from
May 14, 2024

Conversation

dansysanalyst
Copy link
Member

@dansysanalyst dansysanalyst commented May 6, 2024

⚡ PowerGrid - Pull Request

Welcome and thank you for your interest in contributing to our project!. You must use this template to submit a Pull Request or it will not be accepted.


Motivation

  • Bug fix
  • Enhancement
  • New feature
  • Breaking change

Description

While this might be a bit of overengineering, this PR aims to mitgate the risk of using cached table schema after running a migration.

Users might face this problem during development, wasting time on debug and building frustration. We could also assume that an app might be deployed without cleaning caches.

Since we cannot retrieve the cache keys with a wildcard (e.g, Cache::get('powergrid_columns_in_*), my idea is to keep a list of which columns are being cached. Alternativelly, we could just list every table in the database and try to wipe it's PG key.

Of course, we can just discard this idea if it is too much.

Related Issue(s):

Documentation

This PR requires Documentation update?

  • Yes
  • No
  • I have already submitted a Documentation pull request.

@luanfreitasdev luanfreitasdev merged commit d394b2f into Power-Components:5.x May 14, 2024
21 checks passed
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.

2 participants