Load the ACL values either from the cache or from build()
507358
public function load()
    {
        if ($this->_cache instanceof \Zend_Cache_Core) {
            $cache = $this->_cache;
            if (! ($cache->test($this->_cacheid) && $cache->test($this->_cacheid . 'trans'))) {
                // cache miss
                $this->build();
            } else {
                // cache hit
                $this->_acl = $cache->load($this->_cacheid);
                $this->_roleTranslations = $cache->load($this->_cacheid . 'trans');
            }
        } else {
            $this->build();
        }
    }
1230857
private V retrieveCachedValue(boolean loadIfExpired, boolean updateStats) {

		V result;
		V oldValue = null;
		Throwable error = null;
		boolean missed = false;

		// race conditions are allowed
		this.approxAccessCounter++;

		long now;

		CachedValue<V> cached = cachedValue; // read the cached value

		if (cached != null) {

			long expiresAt = cached.expiresAt;
			if (expiresAt == Long.MAX_VALUE) {
				updateStats(false, false);
				return cached.value;
			}

			now = U.time();
			if (now <= expiresAt) {
				updateStats(false, false);
				return cached.value;
			}

		} else {
			now = U.time();
		}

		// ----------------- START LOCKS -----------------

		readLock();

		cached = cachedValue; // read the cached value again, inside the read lock

		if (cached == null || now > cached.expiresAt) {

			readUnlock();
			writeLock();

			// double-check: another thread might have acquired write lock and changed state already
			if (cached == null || now > cached.expiresAt) {

				V newValue;

				if (loadIfExpired) {
					try {
						newValue = loader != null ? loader.map(key) : null;

					} catch (Throwable e) {
						error = e;
						newValue = null;
					}

				} else {
					newValue = null;
				}

				oldValue = setValueInsideWriteLock(newValue);

				missed = true;
			}

			// downgrade by acquiring read lock before releasing write lock
			readLock();
			writeUnlock();
		}

		cached = cachedValue;
		result = cached != null ? cached.value : null; // read the cached value

		readUnlock();

		releaseOldValue(oldValue); // release the old value - outside of lock

		if (updateStats) {
			updateStats(missed, error != null);
		}

		if (error != null) {
			throw U.rte("Couldn't recalculate the cache value!", error);
		}

		return result;
	}
543050
function load() {
  if (process.env.BABEL_DISABLE_CACHE) return;

  process.on("exit", save);
  process.nextTick(save);

  if (!_pathExists2["default"].sync(FILENAME)) return;

  try {
    data = JSON.parse(_fs2["default"].readFileSync(FILENAME));
  } catch (err) {
    return;
  }
}
1297994
private function loadAcl()
    {
        $this->acl = new Acl();

        foreach ($this->serviceLocator->get('BjyAuthorize\RoleProviders') as $provider) {
            $this->addRoleProvider($provider);
        }

        foreach ($this->serviceLocator->get('BjyAuthorize\ResourceProviders') as $provider) {
            $this->addResourceProvider($provider);
        }

        foreach ($this->serviceLocator->get('BjyAuthorize\RuleProviders') as $provider) {
            $this->addRuleProvider($provider);
        }

        foreach ($this->serviceLocator->get('BjyAuthorize\Guards') as $guard) {
            $this->addGuard($guard);
        }

        foreach ($this->roleProviders as $provider) {
            $this->addRoles($provider->getRoles());
        }

        foreach ($this->resourceProviders as $provider) {
            $this->loadResource($provider->getResources(), null);
        }

        foreach ($this->ruleProviders as $provider) {
            $rules = $provider->getRules();
            if (isset($rules['allow'])) {
                foreach ($rules['allow'] as $rule) {
                    $this->loadRule($rule, static::TYPE_ALLOW);
                }
            }

            if (isset($rules['deny'])) {
                foreach ($rules['deny'] as $rule) {
                    $this->loadRule($rule, static::TYPE_DENY);
                }
            }
        }
    }
671168
def load_vars(opt):
    """"""
    if not hasattr(opt, '_vars_cache'):
        cli_opts = cli_hash(opt.extra_vars)
        setattr(opt, '_vars_cache',
                merge_dicts(load_var_files(opt, cli_opts), cli_opts))

    return getattr(opt, '_vars_cache')
162106
def values(self):
        ''''''
        if self.cache.cache is None:
            backend = self.read_backend
            return backend.execute(backend.structure(self).values(),
                                   self.load_values)
        else:
            return self.cache.cache.values()
1060029
def load(path):
  """"""
  proto = _parse_saved_model(path)
  _merge_assets_key_collection(proto, path)
  handler = SavedModelHandler()
  handler._proto = proto  # pylint: disable=protected-access
  return handler
711557
def _load_cache(self):
        """"""
        if not self._disable_cache and os.path.exists(self._cache_path):
            _LOGGER.debug("Cache found at: %s", self._cache_path)
            loaded_cache = UTILS.load_cache(self._cache_path)

            UTILS.update(self._cache, loaded_cache)

        self._save_cache()
1165468
private function _save()
    {
        if ($this->_cache instanceof \Zend_Cache_Core) {
            if (! (
                    $this->_cache->save($this->_acl, $this->_cacheid, array('roles'), null) &&
                    $this->_cache->save($this->_roleTranslations, $this->_cacheid . 'trans', array('roles'), null)
                    )) {
                throw new \Gems_Exception('Failed to save acl to cache');
            }
        }
    }
512984
private function loadCustomerData()
    {
        $custId = $this->registry->registry(\Magento\Customer\Controller\RegistryConstants::CURRENT_CUSTOMER_ID);
        if ($custId) {
            $query = $this->qLoad->build();
            $conn = $query->getConnection();
            $bind = [
                QLoad::BND_CUST_ID => $custId
            ];
            $rs = $conn->fetchAll($query, $bind);
            $this->cacheCustData = reset($rs);
        }
    }
101256
private function load_index()
    {
        if (!$this->db || $this->type == 'db') {
            return;
        }

        if ($this->index !== null) {
            return;
        }

        $index_key = $this->ikey();

        if ($this->type == 'memcache') {
            $data = $this->db->get($index_key);
        }
        else if ($this->type == 'apc') {
            $data = apc_fetch($index_key);
        }

        if ($this->debug) {
            $this->debug('get', $index_key, $data);
        }

        $this->index = $data ? unserialize($data) : array();
    }
930709
def build_acl_port(self, port, enabled=True):
        " "
        if port is not None:
            if ':' in port:
                range = port.replace(':', ' ')
                acl = "range %(range)s " % {'range': range}
            else:
                acl = "eq %(port)s " % {'port': port}
                if not enabled:
                    acl += "inactive"
            return acl
966458
def get_cache(self, namespace, query_hash, length, start, end):
        """"""
        query = 'SELECT start, value FROM gauged_cache WHERE namespace = ? ' \
            'AND hash = ? AND length = ? AND start BETWEEN ? AND ?'
        cursor = self.cursor
        cursor.execute(query, (namespace, query_hash, length, start, end))
        return tuple(cursor.fetchall())
166276
function load()
	{
		// vars
		$path = apply_filters('acf/get_info', 'path');
		
		
		// verify nonce
		if( isset($_POST['nonce']) && wp_verify_nonce($_POST['nonce'], 'export') )
		{
			if( isset($_POST['export_to_xml']) )
			{
				$this->action = 'export_to_xml';
			}
			elseif( isset($_POST['export_to_php']) )
			{
				$this->action = 'export_to_php';
			}
		}
		
		
		// include export action
		if( $this->action == 'export_to_xml' )
		{
			include_once($path . 'core/actions/export.php');
			die;
		}
	}
839070
def set_acl(self, acl_or_str, key_name='', validate=True, headers=None,
                version_id=None):
        """"""
        if not self.bucket_name:
            raise InvalidUriError('set_acl on bucket-less URI (%s)' %
                                  self.uri)
        self.get_bucket(validate, headers).set_acl(acl_or_str, key_name,
                                                   headers, version_id)
19278
def _parse_acl(acl, user, group):
    '''
    
    '''
    comps = acl.split(':')
    vals = {}

    # What type of rule is this?
    vals['type'] = 'acl'
    if comps[0] == 'default':
        vals['type'] = 'default'
        comps.pop(0)

    # If a user is not specified, use the owner of the file
    if comps[0] == 'user' and not comps[1]:
        comps[1] = user
    elif comps[0] == 'group' and not comps[1]:
        comps[1] = group
    vals[comps[0]] = comps[1]

    # Set the permissions fields
    octal = 0
    vals['permissions'] = {}
    if 'r' in comps[-1]:
        octal += 4
        vals['permissions']['read'] = True
    else:
        vals['permissions']['read'] = False
    if 'w' in comps[-1]:
        octal += 2
        vals['permissions']['write'] = True
    else:
        vals['permissions']['write'] = False
    if 'x' in comps[-1]:
        octal += 1
        vals['permissions']['execute'] = True
    else:
        vals['permissions']['execute'] = False
    vals['octal'] = octal

    return vals
905506
private synchronized void loadExistingData() {
        for (ChildData childData : _pathCache.getCurrentData()) {
            addNode(childData.getPath(), parseChildData(childData));
        }
    }