how can i know the value is expired
I save a value with expired time, for excample,100 seconds. then after 100 seconds, how can i konw the expired event. via program or log all ok.
the expiration time means, that the key won't be accessible when this amount time pass. If I got you correctly, you need to get value of the expired key? Why not just increase it's expiration time? There are two options to do this:
1) lcb_touch, which will amend the expiration time
2) lcb_get with exptime set to non-zero
Just to a get(key) and if the key has expired it will return null. If your values/documents are small the impact will be really small.
If the values/documents are big you can check if the value exists. Which SDK are you using? What are the type of value you are storing (JSON/Other) and size?