Problem/Motivation

NB: This module doesn't mess with cache keys. In effect, this deprecation was triggered by trying to build the cache structure exactly how core did it in order to confirm the result, which is now removed.

HOWEVER, row caching is no longer a thing at all, and the module needs to be adjusted to deal with that. We still use all the same information and end up with the same functionality in the end, but only the whole view can be invalidated now instead of an individual row. Core change here #3564937: Remove duplicative caching of views rows

Caching has changed in Drupal Core 11.4.x-dev. The CachePluginBase::getRowCacheKeys() is being deprecated without replacement.

https://www.drupal.org/node/3564958 Views CachePluginBase::getRowCacheKeys() deprecated, row-level caching removed

Alternative needed in time for Drupal 13. An alternate is not needed, tests just need to be updated to not use it.

------ -----------------------------------------------------------
Line tests/src/Kernel/ViewsRowCacheTest.php
------ -----------------------------------------------------------
177 Call to deprecated method getRowCacheKeys() of class
Drupal\views\Plugin\views\cache\CachePluginBase:
in drupal:11.4.0 and is removed from drupal:13.0.0. There
is no replacement.
🪪 method.deprecated

Steps to reproduce

Run tests on next minor eg.
https://git.drupalcode.org/project/views_advanced_cache/-/pipelines/783600

phpstan (next minor): fail

Proposed resolution

  • Investigate what needs to be changed or refactored to maintain functionality of the module.
  • Update tests to no longer use cache keys; they were just used in testing anyway
  • Remove deprecated code
  • Add tests to ensure bubbling of tags added/excluded by this module

Remaining tasks

  • ✅ File an issue
  • ➖ Addition/Change/Update/Fix
  • ➖ Testing to ensure no regression
  • ➖ Automated unit testing coverage
  • ➖ Automated functional testing coverage
  • ➖ UX/UI designer responsibilities
  • ➖ Readability
  • ➖ Accessibility
  • ➖ Performance
  • ➖ Security
  • ➖ Documentation
  • ➖ Code review by maintainers
  • ➖ Full testing and approval
  • ➖ Credit contributors
  • ➖ Review with the product owner
  • ➖ Release notes snippet
  • ❌ Release

User interface changes

  • N/A

API changes

  • N/A

Data model changes

  • N/A

Release notes snippet

  • N/A
Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

elc created an issue. See original summary.

elc’s picture

Issue summary: View changes

https://www.drupal.org/node/3564958 Views CachePluginBase::getRowCacheKeys() deprecated, row-level caching removed.

Row level caching is no longer a thing.

elc’s picture

Title: Caching deprecation due Drupal 13.x » Deprecation of per-row tags and caching; D12 support
Version: 2.x-dev » 3.x-dev
Assigned: Unassigned » elc
Issue summary: View changes
Status: Postponed » Needs work
Related issues: +#3604666: Automated Drupal 12 compatibility fixes for views_advanced_cache 2.x-dev

Update summary.

This update will also coincidentally add Drupal 12 support as minimum supported core will be bumped to D11.4.