Using VS2012 I added the caching feature from the WebRole Properties Caching Tab. Among others, it generated the following XML in web.config:
Yes. Step though the various config and I did reinstall the Azure Tools as well during my troubleshooting.
There is the Web.config which is mentioned above, but in your service definition, ensure it has a line:
This was my root issue, but then had changed nearly everything once trying to get it to work. Also, when I looked at the web role, the Caching tab was missing which was fixed by reinstalling Azure tools (I did a clean up of old ones which may or may not have helped). I initiated it via the Azure site examples rather than what is above.
DataCache AgencyCache = new DataCache("AgencyDataValidation");
Remembering to import:
using Microsoft.ApplicationServer.Caching;