gpt4 book ai didi

java - 将 CacheListener 与 GAE 结合使用

转载 作者:行者123 更新时间:2023-12-02 00:54:59 25 4
gpt4 key购买 nike

我使用 javax.cache API 将 Domain 对象的实例存储在 GAE 的内存缓存中。我希望在任何实例因存储限制或其他原因被驱逐时立即收到通知。 CacheListener 是解决这个问题的方法吗? GAE 在删除实例时是否调用 CacheListener.evict(Object o)?

最佳答案

应用程序引擎 docs声明不支持 onEvict()。

The JCache listener API is partially supported for listeners that can execute during the processing of a app's API call, such as for onPut and onRemove listeners. Listeners that require background processing, like onEvict, are not supported.

关于java - 将 CacheListener 与 GAE 结合使用,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/1219289/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com