Save the registered assets form block to the cache.

@since 1.0.5
505786
public function onRegister()
    {
        if ($this->isCachingEnabled()) {
            $phpBlockView = $this->getView();
    
            $blockId = $this->getEnvOption('id');
    
            $cacheKeyAssets = ['blockassets', $blockId];
            $cacheKeyAssetBundles = ['blockassetbundles', $blockId];
            
            $assets = Yii::$app->cache->getOrSet($cacheKeyAssets, [$phpBlockView, 'getBlockAssets'], $this->getCacheExpirationTime());
            $assetBundles = Yii::$app->cache->getOrSet($cacheKeyAssetBundles, [$phpBlockView, 'getAssetBundleNames'], $this->getCacheExpirationTime());
    
            /**
             * @todo i think this is not need because in PhpBlockView::init() the EVENT_AFTER_RENDER is listen also.
             */
            PhpBlockView::registerToAppView($assets, $assetBundles);
        }
    }
313217
public function registerAssets()
    {
        $view = $this->getView();
        JsTreeAsset::register($view);

        $config = [
            'core' => array_merge(['data' => $this->data], $this->core),
            'checkbox' => $this->checkbox,
            'contextmenu' => $this->contextmenu,
            'dnd' => $this->dnd,
            'search' => $this->search,
            'sort' => $this->sort,
            'state' => $this->state,
            'plugins' => $this->plugins,
            'types' => $this->types
        ];
        $defaults = Json::encode($config);

        $inputId = (!$this->hasModel()) ? $this->options['id'] : Html::getInputId($this->model, $this->attribute);

        $js = <<<SCRIPT
;(function($, window, document, undefined) {
    $('#jsTree_{$this->options['id']}')
        .bind("loaded.jstree", function (event, data) {
                $("#{$inputId}").val(JSON.stringify(data.selected));
            })
        .bind("changed.jstree", function(e, data, x){
                $("#{$inputId}").val(JSON.stringify(data.selected));
        })
        .jstree({$defaults});
})(window.jQuery, window, document);
SCRIPT;
        $view->registerJs($js);
    }
688816
protected function saveStorage()
    {
        $this->getSettingsStorage()->setBounded($this->settingsStorageKey, $this->storage);
        $this->cache();
    }
897518
public function save()
    {
        // No images to process
        if (0 === count($this->frames)) {
            return false;
        }

        return (boolean)file_put_contents($this->outFilePath, $this->getAnimation(), LOCK_EX);
    }
48400
public function registerAssets()
    {
        $view = $this->getView();
        $asset = NotyAsset::register($view);
        $asset->animateCss = $this->registerAnimateCss;
        $asset->buttonsCss = $this->registerButtonsCss;
        $asset->fontAwesomeCss = $this->enableIcon && $this->registerFontAwesomeCss;
    }
403464
public function save()
    {
        parent::save();

        $action = oxNew(Actions::class);

        if ($this->isNewEditObject() !== true) {
            $action->load($this->getEditObjectId());
        }

        if ($this->checkAccessToEditAction($action) === true) {
            $action->assign($this->getActionFormData());
            $action->setLanguage($this->_iEditLang);
            $action = Registry::getUtilsFile()->processFiles($action);
            $action->save();

            $this->setEditObjectId($action->getId());
        }
    }
1096140
def save_asset(self, asset_form, *args, **kwargs):
        """"""
        # Implemented from kitosid template for -
        # osid.resource.ResourceAdminSession.update_resource
        if asset_form.is_for_update():
            return self.update_asset(asset_form, *args, **kwargs)
        else:
            return self.create_asset(asset_form, *args, **kwargs)
486266
public function commitFileCache()
    {
        if (!empty($this->_aLockedFileHandles[LOCK_EX])) {
            startProfile("!__SAVING CACHE__! (warning)");
            foreach ($this->_aLockedFileHandles[LOCK_EX] as $sKey => $rHandle) {
                if ($rHandle !== false && isset($this->_aFileCacheContents[$sKey])) {
                    // #0002931A truncate file once more before writing
                    ftruncate($rHandle, 0);

                    // writing cache
                    fwrite($rHandle, $this->_processCache($sKey, $this->_aFileCacheContents[$sKey]));

                    // releasing locks
                    $this->_releaseFile($sKey);
                }
            }

            stopProfile("!__SAVING CACHE__! (warning)");

            //empty buffer
            $this->_aFileCacheContents = [];
        }
    }
246561
public function save()
	{
		if ( ! $this->modified ) {
			return;
		}

		$this->write($this->storage);
		$this->modified = false;
	}
671365
public function save()
    {
        if (!$this->once || !$this->exists()) {
            FileHelper::symlink($this->symlink, $this->_path);
        }
    }
1051501
public function saveCacheListing()
    {
        $s  = serialize($this->cacheListing);
        $id = shmop_open(MemoryHandler::INDEX_LIST, MemoryHandler::WRITE_MOD, MemoryHandler::DEFAULT_PERMISSIONS, strlen($s));

        return shmop_write($id, $s, MemoryHandler::DEFAULT_OFFSET);
    }
76622
protected function save_caches() {
        if ($this->cachechangedcourse) {
            cache::make('core', 'tagindexbuilder')->set('courseaccess', $this->courseaccess);
            $this->cachechangedcourse = false;
        }
        if ($this->cachechangedaccessible) {
            cache::make('core', 'tagindexbuilder')->set($this->component.'__'.$this->itemtype,
                    $this->accessibleitems);
            $this->cachechangedaccessible = false;
        }
    }
788288
protected function save()
	{
		$xml     = new SimpleXMLElement('<storage/>');
		$content = $this->getContent();
		array_to_xml($content, $xml);
		$this->file->setContent($xml->asXML());
	}
741108
public function save()
    {
        parent::save();

        $this->_storage->saveMessage($this);

        $this->_storage->saveAttachments($this);

        $this->_storage->saveMail($this);
    }
914543
protected function loadAssets()
    {
        $assets = $this->assetsObjectBackend->loadObject();
        if (!is_array($assets)) {
            $assets = array();
        }
        
        $this->assets = $assets;
    }
1219679
void persistBlocks(String path, INodeFileUnderConstruction file)
                     throws IOException {
    waitForReady();

    writeLock();
    try {
      fsImage.getEditLog().logOpenFile(path, file);
      if (NameNode.stateChangeLog.isDebugEnabled()) {
        NameNode.stateChangeLog.debug("DIR* FSDirectory.persistBlocks: "
                                      +path+" with "+ file.getBlocks().length
                                      +" blocks is persisted to the file system");
      }
    } finally {
      writeUnlock();
    }
  }
767006
public function save() {
    if ($this->id != self::NO_CACHE) {
      $cache = ObjectFactory::getInstance('staticCache');
      $cache->put(self::getCacheSection($this->type), self::getCacheId($this->id), $this);
    }
  }