fix update dir ttl bug, add some test case