update the cache
auto close the sqlite connection