The unique map should be set in the constructor function, or else (I believe) each instance of RecordCache will share the same Map.

So:

let RecordCache = function() {
  this.cache = new Map();
}