Skip to content

[docs] Document the Batcher and CacheKey features - #1728

Open
andrewnicols wants to merge 1 commit into
moodle:mainfrom
andrewnicols:MDL-82652
Open

andrewnicols wants to merge 1 commit into
moodle:mainfrom
andrewnicols:MDL-82652

Conversation

@andrewnicols

Copy link
Copy Markdown
Member

MDL-82652

Copilot AI balanced review requested due to automatic review settings October 15, 2026 22:15
@andrewnicols andrewnicols added the blocked-by-tracker This issue is blocked by an issue in https://tracker.moodle.org/ label Oct 15, 2026
@netlify

netlify Bot commented Oct 15, 2026 •

Copy link
Copy Markdown

✅ Deploy Preview for moodledevdocs ready!

Name Link
🔨 Latest commit 477d270
🔍 Latest deploy log https://app.netlify.com/projects/moodledevdocs/deploys/6ad150677f65114f06f94eb3
😎 Deploy Preview https://deploy-preview-1728--moodledevdocs.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
🤖 Make changes Run an agent on this branch

To edit notification comments on pull requests, go to your Netlify project configuration.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

The documented URLs and minimum-version guidance need correction before developers can reliably use the examples.

3 open findings
What changed in this PR

Adds developer guides for request batching and cacheable routes in Moodle’s REST API.

Changes:

  • Documents automatic and manual core/fetch batching.
  • Explains route cache lifetimes, cache keys, headers, and batching interactions.
File Description
docs/​guides/​javascript/​ajax/​batcher.md Explains batching usage and configuration.
docs/​apis/​subsystems/​routing/​caching.md Documents cacheable routes and JavaScript requests.

🧠 Review effort: Balanced


💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

- Performance
---

<Since version="6.0" issueNumber="MDL-82652" />

```php title="A cacheable route"
#[\core\router\route(
path: '/strings/{language}/{component}[/{identifier:.*}]',
Comment on lines +41 to +42
/api/rest/v2/strings/en/core # No cache key - not cached
/api/rest/v2/cachekey:1737584047/strings/en/core # Cacheable

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

blocked-by-tracker This issue is blocked by an issue in https://tracker.moodle.org/

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants