Aggregator page contents could be empty due to missing cache context
Problem/Motivation
If an aggregator page without feed items is requested - e.g. the feed only has a few pages worth of feed items but aggregator?page=10000 is requested - the empty page will be cached by the dynamic page cache without a cache context set. Later requests for aggregator will incorrectly return this empty page.
Steps to reproduce
- Install dynamic page cache module.
- Request a page beyond the number of feed items available, e.g. aggregator?page=10000; page contents will be correctly empty in this case as there are no feed items to display.
- Request a page that should list feed items, e.g. aggregator
- The resulting page contents will be empty because the cache of the initial page=10000 is returned.
Proposed resolution
Pager cache context should be set in all cases, even if there are no items being displayed.
Remaining tasks
Review patch.
User interface changes
None.
API changes
None.
Data model changes
None.
Edited by drupalbot