Lots of PHPDoc improvements.
Fix cache calls in the DB class.