EventListener for Object removed from memcached

风流意气都作罢 提交于 2019-12-13 17:13:58

问题



i am using memcached server to store some object with different expire times, is there some way to add event listener on removal or expiration of that object? Currently i'm using spymemcached client.
How can i achieve that i do some cleanup just before my object is deleted/expires.
Thanks


回答1:


There is no way to register an event listener on memcached server. Also, expired objects are lazily removed from memcached. This means that an expired item will only be removed if you try to get an item that has already expired or if the server runs out of memory and needs to make more room. If you are deleting an item then the item is removed immediately.



来源:https://stackoverflow.com/questions/10702581/eventlistener-for-object-removed-from-memcached

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!