Take a look at:
https://www.dokuwiki.org/devel:changelog
The changelog is stored in per-page changelog files, with a recent changes cache. The recent changes cache is kept in /data/meta/_dokuwiki.changes and trimmed daily.
Feedback welcome - Michael Sy.