This was raised on the Cargo talk page under the heading "_pageData table stores category of pages/files only after second saving of page".
Yaron noted that:
The problem is that, in order to get the category information, the code queries the "categorylinks" DB table, then stores the information in its own _pageData table. So when the page is first saved, the "categorylinks" information doesn't exist yet, so it can't be queried."
He thought the following suggestion could work:
Maybe Cargo could use a MediaWiki hook to add/remove the relevant information in the _pageData table when a page is saved. If this would slow things down it could be optional.
Maybe there is another way to do it, but it would be really useful if this could work, as I'd like to move from using DPL3 (which queries the MW categories table directly, as far as I know) to Cargo for as much as possible.
I guess I could run setCargoPageData.php every night as a cronjob in the meantime.