Function setCacheDefaultChmod

@author: 713uk13m <dev@nguyenanhung.com>
@time  : 10/12/18 18:56

@param $cacheDefaultChmod
199966
public function setCacheDefaultChmod($cacheDefaultChmod)
    {
        $this->cacheDefaultChmod = $cacheDefaultChmod;
        $this->debug->debug(__FUNCTION__, 'setCacheDefaultChmod: ', $this->cacheDefaultChmod);
    }
637983
def SetCacheMode(mode):
    """"""
    global cache_mode
    if mode == "auto":
        cache_mode = AUTO
    elif mode == "force":
        cache_mode = FORCE
    elif mode == "cache":
        cache_mode = CACHE
    else:
        raise ValueError("SCons.SConf.SetCacheMode: Unknown mode " + mode)
325304
protected function _updateModSeq($modseq)
    {
        if (!$this->_initCache(true)) {
            return false;
        }

        $mbox_ob = $this->_mailboxOb();
        $uidvalid = $mbox_ob->getStatus(Horde_Imap_Client::STATUS_UIDVALIDITY);
        $md = $this->_cache->getMetaData($this->_selected, $uidvalid, array(self::CACHE_MODSEQ));

        if (isset($md[self::CACHE_MODSEQ])) {
            if ($md[self::CACHE_MODSEQ] < $modseq) {
                $set = true;
                $sync = $md[self::CACHE_MODSEQ];
            } else {
                $set = false;
                $sync = 0;
            }
            $mbox_ob->setStatus(Horde_Imap_Client::STATUS_SYNCMODSEQ, $md[self::CACHE_MODSEQ]);
        } else {
            $set = true;
            $sync = 0;
        }

        /* $modseq can be 0 - NOMODSEQ - so don't store in that case. */
        if ($set && $modseq) {
            $this->_cache->setMetaData($this->_selected, $uidvalid, array(
                self::CACHE_MODSEQ => $modseq
            ));
        }

        return $sync;
    }
890489
public function setConfigCachemode($v)
    {
        if ($v !== null) {
            $v = (string) $v;
        }

        if ($this->config_cachemode !== $v) {
            $this->config_cachemode = $v;
            $this->modifiedColumns[] = RemoteHistoryContaoPeer::CONFIG_CACHEMODE;
        }


        return $this;
    }
1099353
public static void modifyDefaultThemeClear(int mod) {
        mod &= ThemeManager._THEME_MASK;
        ThemeManager._DEFAULT_THEME |= mod;
        ThemeManager._DEFAULT_THEME ^= mod;
    }
469528
private static function setCache(Cache &$cacheToChange = null, Cache $cache = null, $namespace = null)
    {
        if ($namespace === null) {
            $namespace = self::$cacheDefaultNamespace;
        }
        if (!is_string($namespace)) {
            throw new \InvalidArgumentException("The namespace must be a string.");
        }

        $cacheToChange = $cache;
        if ($cache !== null) {
            $cacheToChange->setNamespace($namespace);
        }
    }
465157
public function set($cacheId, $value)
    {
        $this->setToFirstLevelCache($cacheId, $value);
        $this->secondLevelCache->set($cacheId, $value);
    }
471696
private function setDefaultConfiguration(): void
    {
        $this->parameterBag->set('app.devmode', false);
        $this->parameterBag->set('container.dumper.inline_class_loader', true);

        $this->config->addPass($this->parameterBag);
    }
400640
protected function setCachedData()
    {
        if (empty($this->iElementID)) {
            return;
        }

        $arCacheTags = static::getCacheTag();
        $sCacheKey = $this->iElementID;

        $this->arModelData = CCache::get($arCacheTags, $sCacheKey);
        if (!$this->isEmpty()) {
            return;
        }

        $this->setData();

        //Set cache data
        CCache::forever($arCacheTags, $sCacheKey, $this->arModelData);
    }
1078531
public function set_default(): void
    {
        if (!userHasPermission('admin:auth:groups:setDefault')) {
            show404();
        }

        $oUri            = Factory::service('Uri');
        $oUserGroupModel = Factory::model('UserGroup', 'nails/module-auth');
        $oSession        = Factory::service('Session', 'nails/module-auth');

        if ($oUserGroupModel->setAsDefault($oUri->segment(5))) {
            $oSession->setFlashData(
                'success',
                'Group set as default successfully.'
            );
        } else {
            $oSession->setFlashData(
                'error',
                'Failed to set default user group. ' . $oUserGroupModel->lastError()
            );
        }

        redirect('admin/auth/groups');
    }
210357
protected function setForgottenDefaults()
    {
        // ==== unchecked values ====
        $this->repairConfigValue('bcrypt_cost', 10);

        // cookies* values
        $this->repairConfigValue('cookie_name', 'phpauth_session_cookie');

        // verify* values
        $this->repairConfigValue('verify_password_min_length', 3);

        $this->repairConfigValue('verify_email_min_length', 5);

        $this->repairConfigValue('verify_email_max_length', 100);

        $this->repairConfigValue('verify_email_use_banlist', 1);

        // emailmessage* values

        $this->repairConfigValue('emailmessage_suppress_activation', 0);

        $this->repairConfigValue('emailmessage_suppress_reset', 0);

        $this->repairConfigValue('mail_charset', "UTF-8");

        // others
        $this->repairConfigValue('allow_concurrent_sessions', false);
	}
845704
public function setFetchMode($fetchmode = null)
    {
        $fetchmode = isset($fetchmode)
            ? $fetchmode
            : $this->options['fetch_mode'];

        $this->stmt->setFetchMode($fetchmode);
    }
314304
public function setDefaultMode(string $mode = null) : RauthInterface
    {
        if (!in_array($mode, self::MODES)) {
            throw new \InvalidArgumentException(
                'Mode ' . $mode . ' not accepted!'
            );
        }
        $this->defaultMode = $mode;

        return $this;
    }
395112
private static function setDefaultConfig() {
            if (!self::$defaults) {
                self::$defaults = [self::CFG_ERROR_LEVEL        => error_reporting(),
                                   self::CFG_LOG_ERROR_LOCATION => true];
            }
        }
515143
public function setCacheFolder(?string $cacheFolder)
	{
		if (substr($cacheFolder, -1) !== '/') {
			$cacheFolder .= "/";
		}
		$this->cacheFolder = $cacheFolder;
		$this->initCache();
		return $this;
	}
258365
protected function _setCacheControl()
    {
        $control = '';
        foreach ($this->_cacheDirectives as $key => $val) {
            $control .= $val === true ? $key : sprintf('%s=%s', $key, $val);
            $control .= ', ';
        }
        $control = rtrim($control, ', ');
        $this->_setHeader('Cache-Control', $control);
    }
1260193
public function set_messages_caching($set, $mode = null)
    {
        if ($set) {
            $this->messages_caching = true;

            if ($mode && ($cache = $this->get_mcache_engine())) {
                $cache->set_mode($mode);
            }
        }
        else {
            if ($this->mcache) {
                $this->mcache->close();
            }
            $this->mcache = null;
            $this->messages_caching = false;
        }
    }