Had the same issue/error, when I tried to login to wp-admin.
After checking this post and others,
checked via FTP and couldn’t find any of the files (db.php, advanced-cache.php, object-cache.php) or the W3TC plugin folder.
So I downloaded the W3TC plugin, and uploaded the folder to /plugins/, and the 3 files to /wp-content/.
after that, i was able to access the page /wp-login/ (error was still on /wp-admin/) and login, then reinstall W3TC.
issue appears to be resolved now.