original_string: public function buildSchemaCache()
      {
          $this->cleanupCache();
  
          $tableSchemas = $this->queryTableSchemas();
  
          foreach ($tableSchemas as $tableSchema) {
              if ($this->findColumns($tableSchema)) {
                  $this->findConstraints($tableSchema);
  
                  $key = $this->getTableCacheKey($tableSchema);
                  //Yii::$app->cache->delete($key);
                  $result = Yii::$app->cache->set(
                      $key,
                      $tableSchema,
                      $this->schemaCacheDuration,
                      new TagDependency(['tags' => $this->cacheTagName])
                  );
  
                  if (YII_ENV == 'dev') {
                      if ($result === true)
                          Yii::info("Table \"$tableSchema->fullName\" has been cached", 'Schema cache');
                      else
                          Yii::error("Caching of \"$tableSchema->fullName\" table failed", 'Schema cache');
                  }
              }
          }
  
          Yii::$app->cache->set(
              $this->getCacheCreationTimeKey(),
              microtime(true),
              $this->schemaCacheDuration,
              new TagDependency(['tags' => $this->cacheTagName]));
      }
code: public function buildSchemaCache()
      {
          $this->cleanupCache();
  
          $tableSchemas = $this->queryTableSchemas();
  
          foreach ($tableSchemas as $tableSchema) {
              if ($this->findColumns($tableSchema)) {
                  $this->findConstraints($tableSchema);
  
                  $key = $this->getTableCacheKey($tableSchema);
                  //Yii::$app->cache->delete($key);
                  $result = Yii::$app->cache->set(
                      $key,
                      $tableSchema,
                      $this->schemaCacheDuration,
                      new TagDependency(['tags' => $this->cacheTagName])
                  );
  
                  if (YII_ENV == 'dev') {
                      if ($result === true)
                          Yii::info("Table \"$tableSchema->fullName\" has been cached", 'Schema cache');
                      else
                          Yii::error("Caching of \"$tableSchema->fullName\" table failed", 'Schema cache');
                  }
              }
          }
  
          Yii::$app->cache->set(
              $this->getCacheCreationTimeKey(),
              microtime(true),
              $this->schemaCacheDuration,
              new TagDependency(['tags' => $this->cacheTagName]));
      }
code_tokens: public function buildSchemaCache ( ) { $ this -> cleanupCache ( ) ; $ tableSchemas = $ this -> queryTableSchemas ( ) ; foreach ( $ tableSchemas as $ tableSchema ) { if ( $ this -> findColumns ( $ tableSchema ) ) { $ this -> findConstraints ( $ tableSchema ) ; $ key = $ this -> getTableCacheKey ( $ tableSchema ) ; //Yii::$app->cache->delete($key); $ result = Yii :: $ app -> cache -> set ( $ key , $ tableSchema , $ this -> schemaCacheDuration , new TagDependency ( [ 'tags' => $ this -> cacheTagName ] ) ) ; if ( YII_ENV == 'dev' ) { if ( $ result === true ) Yii :: info ( "Table \"$tableSchema->fullName\" has been cached" , 'Schema cache' ) ; else Yii :: error ( "Caching of \"$tableSchema->fullName\" table failed" , 'Schema cache' ) ; } } } Yii :: $ app -> cache -> set ( $ this -> getCacheCreationTimeKey ( ) , microtime ( true ) , $ this -> schemaCacheDuration , new TagDependency ( [ 'tags' => $ this -> cacheTagName ] ) ) ; }
docstring: Builds schema cache
docstring_tokens: Builds schema cache