Added error checking code for the "cache-key" attribute