Fix wrong method name
Added a test for the cache