cache: add size method
cache: local storage can store permanently with duration of -1

Signed-off-by: 黄小虎 <velna_007@163.com>
dal: add cursor support

Signed-off-by: 黄小虎 <velna_007@163.com>