Added ng cache, added tests for ng cache