Add indexes to speed up stats gathering
Cache total pages of a document in the db.
Take updates
Cache total pages of a document in the db.
Prepare for requiring authentication by private token.