Description
An abstract fragment was originally requested for a given date, as the date was important part of the key.
As part of the durable fragments work, the date will be removed from the key and the recency (freshness/staleness) will be fuzzily determined looking at the stashed value, which will contain the stash date.
For cleanness and interface clarity, we should decouple the date from the request. Currently date is set as TODAY at the start of the request and propagated through the whole chain, so this change can happen without affecting the current Memcached-based behavior:
Two request chains to take into account:
- Abstract Wikipedia UI:
- AbstractPreviewSection.vue component generates the date parameter as TODAY, which travels through...
- abstractWiki.js store module renderFragmentPreview and requestFragmentPreview
- apiUtils.js which calls the API on runAbstractWikiFragment
- ApiAbstractWikiRunFragment.php ActionAPI which receives the date as parameter
- AbstractWikiRequest::fetchRenderedAWFragment
- and finally AWFragmentStore setter
- Refresh job:
- callers:
- maintenance/updateAbstractWikiArticleStore.php, generates today's date with $now = new ConvertibleTimestamp();
- ApiAbstractWikiRunFragment.php ActionAPI which receives the date as parameter (as detailed above)
- Api/AbstractWikiFetchSection.php ActionAPI which also receives the date as parameter, also generated in AbstractPreviewSection.vue (as detailed above)
- AWFragmentStore getter
- CacheAbstractContentFragmentJob.php
- AbstractWikiRequest::fetchRenderedAWFragment
- and finally AWFragmentStore setter
- callers:
Desired behavior/Acceptance criteria
- date is an internal parameter representing today, it might be passed to the AbstractWikiRequest service if needed, but it won't be externally exposed.
Completion checklist
- Before closing this task, review one by one the checklist available here: https://www.mediawiki.org/wiki/Abstract_Wikipedia_team/Definition_of_Done#Front-end_Task/Bug_Completion_Checklist