Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Problem/Motivation
views_invalidate_cache() invalidates all kinds of things, forces a router rebuild and so on. We don't need that. The only thing we need is rebuilding the views data, so let's do just that.
Proposed resolution
Use the pretty new Views::viewsData()->clear(); for that.
Remaining tasks
User interface changes
API changes
Comment | File | Size | Author |
---|---|---|---|
search-api-views-data.patch | 680 bytes | Berdir | |
Comments
Comment #1
BerdirComment #2
miro_dietikerPity views doesn't allow to clear this more specifically.
Comment #4
drunken monkeyThanks a lot!
Committed.
Wouldn't really be possible, I guess, since there is no way to rebuild just the Views data for specific tables (especially because of alter hooks).