code: protected ORecordInternal<?> retrieveRecord(final ORID iRID) {
      if (!isEnabled() || iRID.getClusterId() == excludedCluster)
        return null;
  
      ORecordInternal<?> record;
      underlying.lock(iRID);
      try {
        record = underlying.remove(iRID);
  
        if (record == null || record.isDirty()) {
          OProfiler.getInstance().updateCounter(CACHE_MISS, 1);
          return null;
        }
  
        if (strategy == STRATEGY.COPY_RECORD) {
          final ORecordInternal<?> resident = OGlobalConfiguration.ENVIRONMENT_CONCURRENT.getValueAsBoolean() ? (ORecordInternal<?>) record
              .flatCopy() : record;
          // PUT BACK A COPY OR ThE ORIGINAL IF NOT MULTI-THREADS (THIS UPDATE ALSO THE LRU)
          underlying.put(resident);
        }
  
      } finally {
        underlying.unlock(iRID);
      }
  
      OProfiler.getInstance().updateCounter(CACHE_HIT, 1);
      return record;
    }
docs: Retrieve the record if any following the supported strategies:<br>
  0 = If found remove it (pop): the client (database instances) will push it back when finished or on close.<br>
  1 = Return the instance but keep a copy in 2-level cache; this could help highly-concurrent environment.
  
  @param iRID
  record identity
  @param iRemove
  @return record if exists in cache, {@code null} otherwise