Working on cache test-suite. Fixed some errors in cache and some tests.