Set data of current object in cache
765664
private function saveObjectDataToCache()
    {
        Cacher::getInstance()->getDefaultCacher()->set($this->getCacheKey(), $this->getAsArray(), 3600);

        return $this;
    }
287368
def _get_dataobject(self, name, multivalued):
        """"""
        logger.debug("Querying server for uncached data object %s", name)
        # This will retrieve the value and inject it into the cache
        self.update_view_data(properties=[name])
        return self._cache[name][0]
798036
function(key, data) {
        var currentData;
        currentData = settings[key];
        if ((currentData != null) && _.isObject(currentData)) {
          settings[key] = _.extend(data, settings[key]);
        } else if (currentData == null) {
          settings[key] = data;
        }
      }
1186002
private Object storeCachedObject(K key, CachedObject<V> co) {
		//data is only locked if cleanup removes cached objects
		synchronized (data) {
			data.put(key, co);
		}
		//mirror is also locked if cleanup is busy collecting cached objects
		synchronized (mirror) {
			mirror.put(key, co);
		}
		System.out.println(new LogEntry("object with key " + key + " stored in cache"));
		return co;
	}
1088969
protected function _storeData() {
		if ($this->_currentCellIsDirty) {
			$this->_currentObject->detach();

			$obj = serialize($this->_currentObject);
			if (!$this->_memcache->replace($this->_cachePrefix.$this->_currentObjectID.'.cache',$obj,NULL,$this->_cacheTime)) {
				if (!$this->_memcache->add($this->_cachePrefix.$this->_currentObjectID.'.cache',$obj,NULL,$this->_cacheTime)) {
					$this->__destruct();
					throw new PHPExcel_Exception('Failed to store cell '.$this->_currentObjectID.' in MemCache');
				}
			}
			$this->_currentCellIsDirty = false;
		}
		$this->_currentObjectID = $this->_currentObject = null;
	}
1200841
def take(self, obj):
        """"""
        cached = self._thread_local.cache[self._get_cache_key(obj)]
        build_kwargs = {}

        if 'model' in cached and 'pks' in cached:
            build_kwargs['queryset'] = cached['model'].objects.filter(pk__in=cached['pks'])

        elif 'obj' in cached:
            if cached['obj'].__class__.objects.filter(pk=cached['obj'].pk).exists():
                build_kwargs['obj'] = cached['obj']
            else:
                # Object was deleted in the meantime.
                build_kwargs['queryset'] = cached['obj'].__class__.objects.none()

        self._clean_cache(obj)

        return build_kwargs
275588
def cache_data(datatable, data, **kwargs):
    
    cache_key = '%s%s' % (CACHE_PREFIX, datatable.get_cache_key(**kwargs))
    log.debug("Setting data to cache at %r: %r", cache_key, data)
    cache.set(cache_key, data)
862519
function SetCache(values) {
        var index = -1,
            length = values == null ? 0 : values.length;

        this.__data__ = new MapCache();
        while (++index < length) {
            this.add(values[index]);
        }
    }
335399
public void setTransactionInfo(CachedObject object) {

        Row row = (Row) object;

        if (row.rowAction != null) {
            return;
        }

        RowAction rowact = (RowAction) rowActionMap.get(row.position);

        row.rowAction = rowact;
    }
272977
function set($key, $data)
    {
        $this->cache[$key]         = $data;
        $this->cache_changes[$key] = true;
    }
17589
function _cacheData(key, value) {
    cache[key] = { timeStamp: _getTimeStamp(), value: value };
    _deletePromiseWaiting(key);
    return value;
}
664192
@Override
	public <T> void cache(final Object key, final Object object, Class<T> clas) {
		this.logger.debug("@cache v2 ");

		if (object == null && !isAllowNullable()) {
			return;
		} else {
			this.logger.debug("logging key :", key, " with object : ", object, " with Class : ", clas);
			getCachableMap(clas).put(key, object);
		}
	}
635949
function (obj, cache) {
    if ( cache === void 0 ) cache = [];

    var t$ = Tool;
    // just return if obj is immutable value
    if (obj === null || typeof obj !== 'object') {
      return obj
    }

    // if obj is hit, it is in circular structure
    var hit = t$.find(cache, function (c) { return c.original === obj; });
    if (hit) {
      return hit.copy
    }

    var copy = Array.isArray(obj) ? [] : {};
    // put the copy into cache at first
    // because we want to refer it in recursive deepCopy
    cache.push({
      original: obj,
      copy: copy
    });

    Object.keys(obj).forEach(function (key) {
      copy[key] = t$.deepCopy(obj[key], cache);
    });

    return copy
  }
876663
def set_data(self, data):
        """"""
        for key, val in data.items():
            setattr(self, key, val)
        self.uptime['reloaded'] = datetime.now()
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);
    }
482026
protected function storeData()
    {
        if ($this->currentCellIsDirty && !empty($this->currentObjectID)) {
            $this->currentObject->detach();

            $obj = serialize($this->currentObject);
            if (wincache_ucache_exists($this->cachePrefix.$this->currentObjectID.'.cache')) {
                if (!wincache_ucache_set($this->cachePrefix.$this->currentObjectID.'.cache', $obj, $this->cacheTime)) {
                    $this->__destruct();
                    throw new PHPExcel_Exception('Failed to store cell '.$this->currentObjectID.' in WinCache');
                }
            } else {
                if (!wincache_ucache_add($this->cachePrefix.$this->currentObjectID.'.cache', $obj, $this->cacheTime)) {
                    $this->__destruct();
                    throw new PHPExcel_Exception('Failed to store cell '.$this->currentObjectID.' in WinCache');
                }
            }
            $this->currentCellIsDirty = false;
        }

        $this->currentObjectID = $this->currentObject = null;
    }
958498
def set(self, key, response):
        """"""
        key = self._clean_key(key)
        path = os.path.join(self.cache_dir, key)

        with open(path, 'wb') as f:
            status_str = 'status: {0}\n'.format(response.status_code)
            f.write(status_str.encode('utf8'))
            encoding_str = 'encoding: {0}\n'.format(response.encoding)
            f.write(encoding_str.encode('utf8'))
            for h, v in response.headers.items():
                # header: value\n
                f.write(h.encode('utf8'))
                f.write(b': ')
                f.write(v.encode('utf8'))
                f.write(b'\n')
            # one blank line
            f.write(b'\n')
            f.write(response.content)