Add disk cache test cases.

It's better to move these codes to ```try ... except/finally ... ``` block. So if the ```device_target``` not exist, you can deal with the IndexError/KeyError