Load the persisted cache and return a new instance of this class.
549007
def load(cls, cache_key, deserializer, key_attr):
        
        items = unitdata.kv().get(cache_key) or []
        return cls(cache_key,
                   [deserializer(item) for item in items],
                   key_attr)
1068071
public static Cache getInstance(CacheConnection cc, Config config) throws IOException {
	return cc.getInstance(config);
    }
979478
private function loadCache()
    {
        if (!is_null($this->cache)) {
            return $this->cache;
        }

        if (file_exists($this->getCacheFile()) && !empty($this->getCacheFile())) {
            $this->cache = json_decode(file_get_contents($this->getCacheFile()), true);
            return $this->cache;
        }
        return null;
    }
70819
def load_to(self, last_level_load):
        """"""
        assert isinstance(last_level_load, Cache), \
            "last_level needs to be a Cache object."
        assert last_level_load.load_from is None, \
            "last_level_load must be a last level cache (.load_from is None)."
        self.last_level_load = last_level_load
772396
def refresh(self):
        """"""
        if self._source_tree.cache_is_stale():
            self._source_tree.refresh()
            logging.info('Refreshing object tree')
            self._init_cache()
            self.sync_cache_with_source_tree()
1259768
public function load(): void
    {
        try {
            $keys = $this->cache->get(self::INDEXING_KEY);
            if ($keys instanceof Keys) {
                $this->keys = $keys;
                return;
            }
        } catch (CacheException $e) {
            trigger_error($e->getMessage(), E_USER_WARNING);
        }

        $this->keys = new Keys();
    }
222197
def _load(self):
        """"""

        self.session_id = self._session_object.get_session_id()

        # protection against session_id tampering
        if self.session_id and not self._valid_session_id(self.session_id):
            self.session_id = None

        if self.session_id:
            d = self.store[self.session_id]
            if isinstance(d, dict) and d:
                self.update(d)

        if not self.session_id:
            self.session_id = self._session_object.generate_session_id()

        if not self._data:
            if self._initializer and isinstance(self._initializer, dict):
                self.update(deepcopy(self._initializer))

        self._session_object.set_session_id(self.session_id)
62911
def persist(self, storageLevel):
        
        self.is_cached = True
        javaStorageLevel = self._sc._getJavaStorageLevel(storageLevel)
        self._jdstream.persist(javaStorageLevel)
        return self
1138884
def reload(self):
        

        if not self.id:
            return
        reloaded_object = self.__class__.find(self.id)
        self.set_raw(
            reloaded_object.raw,
            reloaded_object.etag
        )
32498
@Override
    public <T extends Assignable> T load(Class<T> extensionClass, Archive<?> baseArchive)
        throws UnknownExtensionTypeException {
        if (isCached(extensionClass)) {
            return createFromCache(extensionClass, baseArchive);
        }
        T object = createFromLoadExtension(extensionClass, baseArchive);

        addToCache(extensionClass, object.getClass());

        return object;
    }
516533
def cache(self):
        """"""
        if self._cache is None:
            self._cache = django_cache.get_cache(self.cache_name)
        return self._cache
1221876
def copy(self):
        """"""
        return self.__class__(self, key=self._key, load=self._load)
1254737
public function load() : Persistable
    {
        $data = $this->connector->get($this->key) ?: '';

        $persistable = $this->serializer->unserialize($data);

        if (!$persistable instanceof Persistable) {
            throw new RuntimeException('Persistable could not be'
                . ' reconstituted.');
        }

        return $persistable;
    }
1312642
function loadUncached () {
    // execute original query
    return this.query.executeQuery()
    // cache result
    .then(results => {
        // cache results if there are any
        if (results.length > 0) {
            // cache results - do not wait to complete
            this.cacheResults(results)
        }
        // resolve with results
        return results
    })
}
392811
def cache(self, con):
        """"""
        self._lock.acquire()
        try:
            if not self._maxcached or len(self._idle_cache) < self._maxcached:
                con._reset(force=self._reset)  # rollback possible transaction
                # the idle cache is not full, so put it there
                self._idle_cache.append(con)  # append it to the idle cache
            else:  # if the idle cache is already full,
                con.close()  # then close the connection
            self._connections -= 1
            self._lock.notify()
        finally:
            self._lock.release()
444390
def set_load_from(self, load_from):
        """"""
        assert load_from is None or isinstance(load_from, Cache), \
            "load_from needs to be None or a Cache object."
        assert load_from is None or load_from.cl_size <= self.cl_size, \
            "cl_size may only increase towards main memory."
        self.load_from = load_from
        self.backend.load_from = load_from.backend
1274068
def load(self, **kwargs):
        

        # Check if we are using 12.1.0 version or above when using this method
        self._is_version_supported_method('12.1.0')
        newinst = self._stamp_out_core()
        newinst._refresh(**kwargs)

        return newinst