[Reviewer: Alex] Correctly return 404

Alex, can you review this change to return 404 instead of 504 on cache not found errors. 

This fixes #128