Cache support.

Issue #31 - the cache support is implemented. Note that now VMs always have cache size of 0.