Dieser Fehler tritt auf, wenn das Element <CacheResource> in der InvalidateCache-Richtlinie auf einen Namen gesetzt ist, der in der Umgebung, in der der API-Proxy bereitgestellt wird, nicht vorhanden ist.
Diagnose
Ermitteln Sie den Namen der InvalidateCache-Richtlinie, den im <CacheResource>-Element der InvalidateCache-Richtlinie verwendeten ungültigen Cache und die Umgebung, in der der Fehler aufgetreten ist. Sie finden alle diese Elemente in der Fehlermeldung. Im folgenden Fehler lautet der Name der InvalidateCache-Richtlinie InvalidateCache-Token, der Name des ungültigen Caches tokencache und der Umgebungsname test.
Untersuchen Sie den fehlgeschlagenen XML-Code der InvalidateCache-Richtlinie und prüfen Sie, ob der für das <CacheResource>-Element angegebene Cache-Name mit der Fehlermeldung übereinstimmt.
In diesem Beispiel lautet der im <CacheResource>-Element angegebene Cachename tokencache:
Prüfen Sie, ob der Cache (in Schritt #1 ermittelt) in der spezifischen Umgebung (in Schritt #1 identifiziert) definiert wurde.
Gehen Sie in der Apigee-Benutzeroberfläche auf ADMIN > Umgebung > Test und prüfen Sie, ob der Cache auf dem Tab Caches der Umgebungskonfiguration vorhanden ist. Wenn der Cache nicht vorhanden ist, ist dies die Ursache des Fehlers.
Beachten Sie beispielsweise im folgenden Screenshot, dass der Cache mit dem Namen tokencache nicht existiert.
Da der Cache mit dem Namen tokencache nicht in der test-Umgebung definiert ist, wird dieser Fehler ausgegeben:
Achten Sie darauf, dass der Cache im Element <CacheResource> der InvalidateCache-Richtlinie in der Umgebung erstellt wurde, in der Sie den API-Proxy bereitstellen möchten.
CacheNotFound
Fehlermeldung
Die Bereitstellung des API-Proxys über die Apigee-Benutzeroberfläche oder API führt zu einer Fehlermeldung wie dieser und der Bereitstellungsstatus des API-Proxys wird als teilweise bereitgestellt gekennzeichnet:
Error: Cache : cache_resource, not found in organization : organization__environment.
Beispiel für Fehlermeldung
Error Cache : configCache, not found in organization : kkalckstein-eval__test
Ursache
Dieser Fehler tritt auf, wenn der in der Fehlermeldung erwähnte Cache nicht auf einer bestimmten Message Processor-Komponente erstellt wurde. Ein Message Processor ist eine interne Komponente, die den Flow des API-Traffics über Apigee verarbeitet.
Lösung
Wenden Sie sich an den Apigee-Support, wenn Sie Hilfe brauchen.
[[["Leicht verständlich","easyToUnderstand","thumb-up"],["Mein Problem wurde gelöst","solvedMyProblem","thumb-up"],["Sonstiges","otherUp","thumb-up"]],[["Schwer verständlich","hardToUnderstand","thumb-down"],["Informationen oder Beispielcode falsch","incorrectInformationOrSampleCode","thumb-down"],["Benötigte Informationen/Beispiele nicht gefunden","missingTheInformationSamplesINeed","thumb-down"],["Problem mit der Übersetzung","translationIssue","thumb-down"],["Sonstiges","otherDown","thumb-down"]],["Zuletzt aktualisiert: 2025-09-04 (UTC)."],[[["\u003cp\u003eThe "InvalidCacheResourceReference" error occurs when an InvalidateCache policy references a cache name that does not exist in the target environment during API proxy deployment.\u003c/p\u003e\n"],["\u003cp\u003eTo diagnose "InvalidCacheResourceReference," check the error message for the InvalidateCache policy name, invalid cache name, and environment, then verify the cache definition within that environment.\u003c/p\u003e\n"],["\u003cp\u003eThe "CacheNotFound" error means that a cache required by the API proxy has not been created on a Message Processor component.\u003c/p\u003e\n"],["\u003cp\u003eThe resolution for "InvalidCacheResourceReference" is to ensure the cache specified in the InvalidateCache policy's \u003ccode\u003e<CacheResource>\u003c/code\u003e element is created in the deployment environment.\u003c/p\u003e\n"],["\u003cp\u003e"CacheNotFound" error resolution is handled by contacting Apigee Support.\u003c/p\u003e\n"]]],[],null,["# Invalidate Cache policy deployment error troubleshooting\n\n*You're viewing **Apigee** and **Apigee hybrid** documentation.\nView [Apigee Edge](https://docs.apigee.com/api-platform/troubleshoot/policies/deployment/invalidate-cache-deployment-errors) documentation.*\n| Was this troubleshooting playbook helpful? Please let us know by clicking [Send Feedback]().\n\nInvalidCacheResourceReference\n-----------------------------\n\n### Error Message\n\nDeployment of the API proxy through either the Apigee UI or API fails with this error message: \n\n```\nError Deploying Revision revision_number to environment\nInvalid cache resource reference [cache_resource] in Step definition [invalidate_cache_policy_name]. Context Revision:[revision_number];APIProxy:[apiproxy_name];Organization:[organization];Environment:[environment]\n```\n\n### Example Error Message\n\n Error Deploying Revision 2 to test\n Invalid cache resource reference tokencache in Step definition InvalidateCache-Token. Context Revision:2;APIProxy:TestCache;Organization:kkalckstein-eval;Environment:test\n\n### Example Error Screenshot\n\n### Cause\n\nThis error occurs if the `\u003cCacheResource\u003e` element in the InvalidateCache policy is set to a name that does not exist in the environment where the API proxy is being deployed.\n\n### Diagnosis\n\n1. Identify the [InvalidateCache policy](/apigee/docs/api-platform/reference/policies/invalidate-cache-policy) name, the invalid cache used in `\u003cCacheResource\u003e` element of the InvalidateCache policy, and the environment where the error occurred. You can find all these items in the error message. For example, in the following error, the InvalidateCache policy name is `InvalidateCache-Token`, the name of the invalid cache is `tokencache`, and the environment name is `test`.\n\n Invalid cache resource reference tokencache in Step definition InvalidateCache-Token. Context Revision:2;APIProxy:TestCache;Organization:kkalckstein-eval;Environment:test\n\n2. Examine the failed InvalidateCache policy XML and verify if the cache name specified for the `\u003cCacheResource\u003e` element matches with the error message.\n\n In this example, the cache name specified in the `\u003cCacheResource\u003e` element is `tokencache`: \n\n \u003c?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\"?\u003e\n \u003cInvalidateCache async=\"false\" continueOnError=\"false\" enabled=\"true\" name=\"InvalidateCache-Token\"\u003e\n \u003cDisplayName\u003eInvalidateCache-Token\u003c/DisplayName\u003e\n \u003cProperties/\u003e\n \u003cCacheKey\u003e\n \u003cPrefix/\u003e\n \u003cKeyFragment ref=\"\"/\u003e\n \u003c/CacheKey\u003e\n \u003cCacheResource\u003etokencache\u003c/CacheResource\u003e\n \u003cScope\u003eExclusive\u003c/Scope\u003e\n \u003cCacheContext\u003e\n \u003cAPIProxyName/\u003e\n \u003cProxyName\u003edefault\u003c/ProxyName\u003e\n \u003cTargetName\u003edefault\u003c/TargetName\u003e\n \u003c/CacheContext\u003e\n \u003cPurgeChildEntries\u003efalse\u003c/PurgeChildEntries\u003e\n \u003c/InvalidateCache\u003e\n\n3. Verify if the cache (determined in step #1) has been defined in the specific environment (identified in step #1).\n\n In the Apigee UI, navigate to **ADMIN \\\u003e Environment \\\u003e test** and check if the cache exists in the **Caches** tab of **Environment Configuration**. If the cache does not exist, then that's the cause of the error.\n\n For example, notice in the screenshot below that the cache named `tokencache` does not exist.\n\n Because the cache named `tokencache` is not defined in the `test` environment, you get the error: \n\n Invalid cache resource reference tokencache in Step definition InvalidateCache-Token. Context Revision:2;APIProxy:TestCache;Organization:kkalckstein-eval;Environment:test\n\n### Resolution\n\nEnsure that the cache specified in the `\u003cCacheResource\u003e` element of InvalidateCache policy has been created in the environment where you want to deploy the API proxy.\n\nCacheNotFound\n-------------\n\n### Error Message\n\nDeployment of the API proxy through either the Apigee UI or API results in an error message like this, and the deployment status of the API Proxy is marked as partially deployed: \n\n```\nError: Cache : cache_resource, not found in organization : organization__environment.\n```\n\n### Example Error Message\n\n Error Cache : configCache, not found in organization : kkalckstein-eval__test\n\n### Cause\n\nThis error occurs if the specific cache mentioned in the error message has not been created on a specific Message Processor component. A Message Processor is an internal component that processes the flow of API traffic through Apigee.\n\n### Resolution\n\nContact [Apigee Support](https://apigee.com/about/support/portal) for assistance."]]