Problem/Motivation

As identified in #2381277: Make Views use render caching and remove Views' own "output caching" we don't yet vary our caching by exposed sorts / items_per_page as well as offset.

Proposed resolution

Remaining tasks

User interface changes

API changes

Comments

dawehner’s picture

StatusFileSize
new7.63 KB

First version with some test

dawehner’s picture

Status: Active » Needs review

.

Status: Needs review » Needs work

The last submitted patch, 1: 2487099-1.patch, failed testing.

dawehner’s picture

Status: Needs work » Needs review
StatusFileSize
new8.09 KB
new1.08 KB

I hope this fixes some of the failures.

wim leers’s picture

Status: Needs review » Needs work

The last submitted patch, 4: 2487099-4.patch, failed testing.

wim leers’s picture

Status: Needs work » Reviewed & tested by the community
StatusFileSize
new8.54 KB
new1018 bytes

Looks good. Only fixing a silly typo.

Status: Reviewed & tested by the community » Needs work

The last submitted patch, 7: 2487099-7.patch, failed testing.

dawehner’s picture

Status: Needs work » Needs review
StatusFileSize
new12.3 KB
new4.21 KB

Fixed the test and expanded the test coverage a bit.

wim leers’s picture

Status: Needs review » Reviewed & tested by the community

Even better!

Status: Reviewed & tested by the community » Needs work

The last submitted patch, 9: 2487099-7.patch, failed testing.

dawehner’s picture

Status: Needs work » Needs review
StatusFileSize
new10.45 KB
new2 KB

Failed ...

Status: Needs review » Needs work

The last submitted patch, 12: 2487099-12.patch, failed testing.

wim leers’s picture

That interdiff seems wrong; but no matter, it's still coming back red :(

plach’s picture

Status: Needs work » Needs review
StatusFileSize
new1.91 KB
new8.23 KB

This is not failing locally.

+++ b/core/modules/views/src/Tests/Plugin/ExposedFormTest.php
@@ -191,6 +195,54 @@ public function testInputRequired() {
+  protected function assertIds(array $ids) {

Missing PHP docs, fixed.

Status: Needs review » Needs work

The last submitted patch, 15: 2487099-15.patch, failed testing.

plach’s picture

Status: Needs work » Needs review
StatusFileSize
new834 bytes
new8.24 KB
new11.77 KB

Daniel suggested to remove the verbose flag

plach’s picture

StatusFileSize
new9.99 KB

I wish I was able to roll patches...
(interdiff in #17 is correct)

dawehner’s picture

Otherwise this one feels RTBC

wim leers’s picture

Status: Needs review » Reviewed & tested by the community
alexpott’s picture

Status: Reviewed & tested by the community » Needs work
+++ b/core/modules/system/src/Tests/Cache/AssertPageCacheContextsAndTagsTrait.php
@@ -105,6 +105,8 @@ protected function assertCacheTags(array $expected_tags) {
+    sort($expected_contexts);
+    sort($actual_contexts);
     $this->assertIdentical($actual_contexts, $expected_contexts);

Is this really required? Why not use assertEqual then?

wim leers’s picture

Status: Needs work » Reviewed & tested by the community

Because it's then easier to spot the errors. Cache::mergeContexts() also sorts them, so IMHO it makes sense to also have the expectation that the contexts are sorted in tests, and if necessary, sort them.

alexpott’s picture

Status: Reviewed & tested by the community » Fixed

@Wim Leers fair enough - that makes sense.

This issue is a major task that will improve performance significantly and the disruption it introduces is limited. Per https://www.drupal.org/core/beta-changes, this is a good change to complete during the Drupal 8 beta phase. Committed 8e866ef and pushed to 8.0.x. Thanks!

  • alexpott committed 8e866ef on 8.0.x
    Issue #2487099 by dawehner, plach, Wim Leers: Set cache contexts for...

Status: Fixed » Closed (fixed)

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

cilefen’s picture