added serialize and test case  for db cache