BUGFIX: cache did not support non strings

also reduced mocking in tests