[BUGFIX] Switch to cache insertion hook right before DB save

Previous hook was located immediately *after* saving cached page content.