ApiGee InvalidateCache策略

时间:2014-08-01 11:09:45

标签: apigee

我希望在 ApiGee 端进行简单的会话管理,所以我决定将会话状态保留在缓存中。我使用 PopulateCache LookupCache InvalidateCache 策略来实现它。问题是当此特定策略附加到 flow (无论 pre-flow post-flow 或任何特定流程)时,虽然 ApiGee UI已成功部署(部署按钮上的环境名称旁边的绿色圆圈),但修订无法正确部署。当我尝试在代理处抛出请求时

{
    fault: {
        faultstring: "Internal server error APIProxy revision 1 of myapp does not exist in environment test of     organization marcinklopotek",
        detail: {
            errorcode: "messaging.adaptors.http.ServerError"
        }
    }
}

重新部署也无济于事。


我设法隔离案例以重现问题。

重现的步骤:

  1. 使用无目标起点类型创建新代理。
  2. 转到开发视图。
  3. 新政策列表中选择无效缓存政策。
  4. 将策略附加到 PostFlow 响应段。
  5. 从政策文件中删除< CacheResource>默认< / CacheResource> 行(使用内置缓存)
  6. 使用保存按钮保存修订。
  7. 预期结果:

    • 向代理提供请求的能力
    • 启动跟踪会话的能力

    实际结果:

    - 向代理发送请求会导致错误

    {
        fault: {
            faultstring: "Internal server error APIProxy revision 1 of No-Target does not exist in environment test of organization marcinklopotek",
            detail: {
               errorcode: "messaging.adaptors.http.ServerError"
            }
        }
    }
    

    - 启动跟踪会话会导致错误

    Error creating trace session for API proxy No-Target, revision 1, environment test.
    Failed to create DebugSession 1406889941313
    

    其他信息:

    - 分离和删除策略也没有帮助,并导致相同的错误

    - 分离和删除策略并保存新修订导致

    Error Deploying
    Path /no-target conflicts with existing deployment path for revision 1 of the APIProxy No-Target in organization marcinklopotek
    

1 个答案:

答案 0 :(得分:1)

这是Apigee的产品问题。使用不带缓存资源的InvalidateCache策略时,部署代理时出现问题。解决方法是在环境中创建缓存资源,并参考策略中的缓存资源:

相关问题