Save the provided library's data to the on disk location.

@param string $CacheName name of cache library
@return void
554843
public static function SaveCache($CacheName) {
      if ($CacheName != 'locale') return;
      
      if (!array_key_exists($CacheName,self::$Caches)) 
         return FALSE;
      
      $UseCache = (Gdn::Cache()->Type() == Gdn_Cache::CACHE_TYPE_MEMORY && Gdn::Cache()->ActiveEnabled());
      if ($UseCache) {
         $CacheKey = sprintf(Gdn_LibraryMap::CACHE_CACHE_NAME_FORMAT, $CacheName);
         $Stored = Gdn::Cache()->Store($CacheKey, self::$Caches[$CacheName]['cache']);
      } else {
         $FileName = self::$Caches[$CacheName]['ondisk'];
         $CacheContents = "";
         foreach (self::$Caches[$CacheName]['cache'] as $SectionTitle => $SectionData) {
            $CacheContents .= "[{$SectionTitle}]\n";
            foreach ($SectionData as $StoreKey => $StoreValue) {
               $CacheContents .= "{$StoreKey} = \"{$StoreValue}\"\n";
            }
         }
         try {
            Gdn_FileSystem::SaveFile(PATH_CACHE.DS.$FileName, $CacheContents, LOCK_EX);
         }
         catch (Exception $e) {}
      }
   }
192437
public function saveToFile($FileName = null)
    {
        if (! is_null($FileName)) {
            $this->FileName = $FileName;
        }

        if (($this->_openSHPFile(true)) && ($this->_openSHXFile(true)) && ($this->_createDBFFile())) {
            $this->_saveHeaders();
            $this->_saveRecords();
            $this->_closeSHPFile();
            $this->_closeSHXFile();
            $this->_closeDBFFile();
        } else {
            return false;
        }
    }
183241
protected function setCache($cachename,$value,$expired){
        Cache::put($cachename,$value,$expired/60);
        return false;
    }
817816
public function saveAs($name)
    {
        $this->section_data[$name] = ob_get_clean();
        $this->ob_level--;
        if ($this->ob_level) {
            echo $this->section_data[$name];
        }
    }
536408
public static function ClearCache($CacheName = FALSE) {
      Gdn_Autoloader::SmartFree();
      if ($CacheName != 'locale') return;
      
      if (!array_key_exists($CacheName,self::$Caches))
         return self::PrepareCache($CacheName);
      
      $UseCache = (Gdn::Cache()->Type() == Gdn_Cache::CACHE_TYPE_MEMORY && Gdn::Cache()->ActiveEnabled());
      if ($UseCache) {
         $CacheKey = sprintf(Gdn_LibraryMap::CACHE_CACHE_NAME_FORMAT, $CacheName);
         $Deleted = Gdn::Cache()->Remove($CacheKey);
      } else {
         @unlink(PATH_CACHE.DS.self::$Caches[$CacheName]['ondisk']);
      }
      self::$Caches[$CacheName]['cache'] = array();
   }
360342
public function save($filename, $content) {
        if ($this->driver) {
            return $this->driver->save($filename, $content);
        }

        return false;
    }
119961
public function cache($key, $value)
    {
        $fileName = $this->getCacheFilename($key);

        $this->log(
            Mustache_Logger::DEBUG,
            'Writing to template cache: "{fileName}"',
            array('fileName' => $fileName)
        );

        $this->writeFile($fileName, $value);
        $this->load($key);
    }
251340
public function setFileName( $fileName ){
		$this->fileName	= $fileName;
		$this->sheet	= self::load( $fileName );
	}
104239
public function saveInCache($key, $value)
  {
    $this->deleteFromCache($key);
    $this->memcache->set($this->buildMKey($key), serialize($value));
  }
1085816
public function _savePageSource($filename)
    {
        if (!isset($this->webDriver)) {
            $this->debug('WebDriver::_savePageSource method has been called when webDriver is not set');
            return;
        }
        try {
            file_put_contents($filename, $this->webDriver->getPageSource());
        } catch (\Exception $e) {
            $this->debug('Unable to retrieve source page from Selenium : ' . $e->getMessage());
        }
    }
891643
public void save(String storageName) {
        //store the objects on storage
        storageEngine.saveObject("modelParameters", modelParameters);
        storageEngine.saveObject("trainingParameters", trainingParameters);

        //rename the storage
        storageEngine.rename(storageName);

        //reload the model parameters, necessary for the maps to point to the new location
        modelParameters = (MP) storageEngine.loadObject("modelParameters", ModelParameters.class);
    }
883541
protected function writeToCache($fileName, $content)
    {
        if ($this->cachePath === null || !is_dir($this->cachePath) || !is_writable($this->cachePath)) {
            return;
        }
        $encoder    = new \Riimu\Kit\PHPEncoder\PHPEncoder();
        $contentPHP = $encoder->encode($content, [
            'whitespace' => false,
            'recursion.detect' => false
        ]);
        $cache      = '<?php $crudlexCacheContent = '.$contentPHP.';';
        file_put_contents($this->getCacheFile($fileName), $cache);
    }
1260790
public function saveCache($cacheKey, $data, $cacheTags = [], $lifetime = self::DEFAULT_LIFETIME)
    {
        $this->localCache[$cacheKey] = $data;

        if (!is_string($data)) {
            $data = serialize($data);
        }

        $this->cache->save($data, $cacheKey, $cacheTags, $lifetime);
    }
304930
public function save($fileName = null)
	{
		file_put_contents(empty($fileName) ? $this->fileName : $fileName, '<?php return ' . var_export($this->data, true) . ';', LOCK_EX);
	}
653339
public function save($pathname)
    {
        $gif = new Encoder($this->frames, $this->delays, 0, 2, 0, 0, 0, 'bin');
        file_put_contents($pathname, $gif->getAnimation());
    }
885866
protected function setCache($cachename,$value,$expired=0){
        $file = $this->cachedir . $cachename . '.cache';
        $data = array(
                'value' => $value,
                'expired' => $expired ? time() + $expired : 0
        );
        return file_put_contents( $file, serialize($data) ) ? true : false;
    }
787555
public static function save(string $filename, string $data): bool
    {
        return \file_put_contents($filename, $data) !== false;
    }