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

CommentFileSizeAuthor
search-api-views-data.patch680 bytesBerdir
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Berdir’s picture

Status: Active » Needs review
miro_dietiker’s picture

Status: Needs review » Reviewed & tested by the community

Pity views doesn't allow to clear this more specifically.

  • drunken monkey committed 6c9f2ed on 8.x-1.x authored by Berdir
    Issue #2501581 by Berdir: Fixed Views cache clearing when saving an...
drunken monkey’s picture

Status: Reviewed & tested by the community » Fixed

Thanks a lot!
Committed.

Pity views doesn't allow to clear this more specifically.

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).

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.