If you happen to get the error below when publishing an API to a different environment, it is very likely because the cache resource being referenced in the API proxy does not exist in the new environment.
Error:
Deployment action: Operation failed. Server Error. Invalid cache resource reference CacheResource in Step definition ResponseCachePolicy. Context Revision:XX;APIProxy:Proxy_Name;Organization:Org_Name;Environment:Env_Name
To create a cache resource in the new environment, please refer : http://apigee.com/docs/api-services/content/manage-caches-environment
One more reason I found for the same error is,
If there are two <CacheResource> tags present in the XML for Populate,Lookup cache,then the same error occurs.Only one <CacheResource> tag should be present.