public Partition getPartition(List<String> partVals, SharedCache sharedCache) {
      Partition part = null;
      try {
        tableLock.readLock().lock();
        PartitionWrapper wrapper = partitionCache.get(CacheUtils.buildPartitionCacheKey(partVals));
        if (wrapper == null) {
          LOG.debug("Partition: " + partVals + " is not present in the cache.");
          return null;
        }
        part = CacheUtils.assemble(wrapper, sharedCache);
      } finally {
        tableLock.readLock().unlock();
      }
      return part;
    }
Common method to cache constraints
@param constraintsList list of constraints to add to cache
@param fromPrewarm is this method called as part of prewarm phase
@param mn Constraint type
@return memory constraint is handled by cache eviction policy hence this method will always return true
if correct constraint type is provided.
standalone-metastore/metastore-server/src/main/java/org/apache/hadoop/hive/metastore/cache/SharedCache.java