code: function persist(pErr, pVal) {
            if (pErr) {
              return cb(pErr);
            }
  
            if (ttl) {
              conn.setex(key, ttl, pVal, handleResponse(conn, cb));
            } else {
              conn.set(key, pVal, handleResponse(conn, cb));
            }
          }
docs: Refactored to remove duplicate code.