Add two tests. Fix cursor behavior in Cache::search.