missing braces

Fix if statement that returns an error is cache is not enabled.