Server: make failure to cache a fatal error.

Also, cleanup and improve the logging code around that area a tiny bit.