- π¬π§United Kingdom catch
This seems like a possible use case for a hook that runs every time after updates have run, but separate from hook_flush_caches(), like hook_after_updates_cleanup() or something like that?
- π³π±Netherlands Lendude Amsterdam
That would solve the timing issue, but I think it would still be good to somehow figure out if something changed in Views data/schema before flushing the temp storage, but no idea how we could do that accurately.
Alternatively we could add config checking to saving Views, something like β¨ Provide a way to validate the current configuration state Needs work or what https://www.drupal.org/project/config_inspector β does and block saving a temp View when it's config isn't valid for the current schema versions
- π¬π§United Kingdom catch
That would solve the timing issue, but I think it would still be good to somehow figure out if something changed in Views data/schema before flushing the temp storage
There is @joachim's idea to store a hash of views data in key/value or similar - but while that would work if we compared it on every cache clear, it won't work in a post-deploy hook, because then the hash would already have been updated and match views data before we get there (usually).