implement getters for mem and cache