Dynamic mapping works using memory cache

Passed functional test when using memory cache.
Disk cache is not working yet.