Memory adapter is now storing its data at the right point

Fixes #370

the cache database got initialized wrong in the data adapter.