appcache and add unit cases