public void invalidateConstraintsCache() {
      try {
        tableLock.writeLock().lock();
        this.setConstraintsValid(false);
        tableToUpdateSize.add(getTblKey());
      } finally {
        tableLock.writeLock().unlock();
      }
    }
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