Sets the local and extended cache.

@param string $cid           Path to JSON file.
@param object $component_obj Object to be stored in cache.
348606
protected function setCache($cid, $component_obj)
    {
        $this->localCache[$cid] = $component_obj;
        $this->saveCache($cid, $component_obj);
    }
122845
public void set(String alias, Object obj) {
        map.put(alias, (Extension)obj);
    }
651208
public void
setCache(Cache cache) {
	if (cache == null) {
		this.cache = new Cache(dclass);
		this.temporary_cache = true;
	} else {
		this.cache = cache;
		this.temporary_cache = false;
	}
}
1014335
protected function addToComponentTree($componentId, array $componentPath, array &$tree)
    {
        // If the component has to be placed in a subpath
        if (count($componentPath)) {
            $subpath = array_shift($componentPath);
            if (empty($tree[$subpath])) {
                $tree[$subpath] = [];
            }
            $this->addToComponentTree($componentId, $componentPath, $tree[$subpath]);

            return;
        }

        $tree[] = $componentId;
    }
1170661
public function add(ComponentInterface $object)
	{
	    $id = get_class($object);

	    if ($this->has($id))
	        throw new ContainerException('A class with ID ' . $id . ' already exists in this container.');

		$this->storedComponents[$id] = $object;
	}
472467
function _cacheIPN($ipnDataRaw)
    {
        $om = $this->objectManager;
        
        // If we don't already have a cache row,
        if (!($cache = $om->getRepository($this->clsIpnLog)
                ->findOneBy(array('listenerName' => 'IPN', 'transactionType' => 'cache')))) {

            $cache = new $this->clsIpnLog; // Create a new one
            $cache->setListenerName('IPN');
            $cache->setTransactionType('cache');
        }

        // Let's log the raw IPN data - either update or insert
        $cache->setDetail(serialize($ipnDataRaw));
        if(!$cache->getCreatedAt())
            $cache->setCreatedAt(new \DateTime());
        $cache->setUpdatedAt(new \DateTime());
        $om->persist($cache);
        $om->flush();
    }
388470
public function cachedCompiler($outputDir = '', $debug = false)
    {
        $outputDir = $outputDir ?: CACHE . 'asset_compress' . DS;
        $debug = $debug ?: Configure::read('debug');

        return parent::cachedCompiler($outputDir, $debug);
    }
1155616
private static void setCache(CmsObject cms, CmsXmlContainerPage xmlCntPage, boolean keepEncoding) {

        if (xmlCntPage.getFile() instanceof I_CmsHistoryResource) {
            return;
        }
        boolean online = cms.getRequestContext().getCurrentProject().isOnlineProject();
        getCache().setCacheContainerPage(
            getCache().getCacheKey(xmlCntPage.getFile().getStructureId(), keepEncoding),
            xmlCntPage,
            online);
    }
1139503
@Override
	public void cache(final Object key, final Object object) {
		this.logger.debug("@cache ");

		if (object == null) {
			if (!isAllowNullable()) {
				return;
			}
			this.logger.debug("logging key :", key, " with null");
			getCachableMap(JKAbstractCacheManager.NULLABLE_MAP_CLASS).put(key, null);
		} else {
			cache(key, object, object.getClass());
		}
	}
266129
public boolean setCache(Object objTargetRow, Object data)
    {
        if (objTargetRow != NONE)
        {
            if (m_mapCache != null)
            {
                int iTargetRow = ((Integer)objTargetRow).intValue();
                int iCurrentPhysicalRecord = ((Integer)m_objCurrentPhysicalRecord).intValue();
                if (iTargetRow == iCurrentPhysicalRecord)
                {   // Reset the current record
                    m_objCurrentPhysicalRecord = NONE;
                    m_objCurrentCacheRecord = NONE;
                    m_objCurrentLockedRecord = NONE;
                }
                if (m_iPhysicalLastRecordPlusOne == iTargetRow)
                    m_iPhysicalLastRecordPlusOne++;
                m_mapCache.set(iTargetRow, data); // Make sure the cache matches the actual
                return true;
            }
            if (m_htCache != null)
            {
                if (objTargetRow.equals(m_objCurrentPhysicalRecord))
                {   // Reset the current record.
                    m_objCurrentPhysicalRecord = NONE;
                    m_objCurrentCacheRecord = NONE;
                    m_objCurrentLockedRecord = NONE;
                }
                if (data != null)
                    m_htCache.put(objTargetRow, data);  // Make sure the cache matches the actual
                else
                    m_htCache.remove(objTargetRow);
                return true;
            }
        }
        return false; // nothing updated
    }
896302
public static function delFdByCoId(int $cid = null): bool
    {
        $cid = $cid > -1 ? $cid : self::getCoroutineId();

        if (isset(self::$map[$cid])) {
            unset(self::$map[$cid]);

            return true;
        }

        return false;
    }
246747
function (item, index) {
            var component = this._createComponentForItem(item, index);
            this._cacheComponentForItem(item, component);
            this._innerAddChild(component, index);
        }
17011
public function updateDisplayOrder($displayOrder, $cID = 0)
    {
        $displayOrder = (int) $displayOrder;

        //this line was added to allow changing the display order of aliases
        if (!intval($cID)) {
            $cID = ($this->getCollectionPointerOriginalID() > 0) ? $this->getCollectionPointerOriginalID() : $this->cID;
        }

        $app = Application::getFacadeApplication();
        $db = $app->make(Connection::class);

        $oldDisplayOrder = $db->fetchColumn('SELECT cDisplayOrder FROM Pages WHERE cID = ?', [$cID]);

        // Exit out if the display order for this page doesn't change.
        if ($oldDisplayOrder === null || $displayOrder === (int) $oldDisplayOrder) {
            return;
        }

        // Store the new display order.
        $db->executeQuery('update Pages set cDisplayOrder = ? where cID = ?', [$displayOrder, $cID]);

        // Because the display order of another page can be changed,
        // the page object is retrieved first in order to pass it to the event.
        $page = $this;
        if ($cID && (int) $cID !== (int) $this->getCollectionID()) {
            $page = static::getByID($cID);
        }

        if ($page->isError()) {
            return;
        }

        // Fire an event that the page display order has changed.
        $event = new DisplayOrderUpdateEvent($page);
        $event->setOldDisplayOrder($oldDisplayOrder);
        $event->setNewDisplayOrder($displayOrder);
        Events::dispatch('on_page_display_order_update', $event);
    }
117891
public function initializeObject(object $obj) : void
    {
        if ($obj instanceof GhostObjectInterface) {
            $obj->initializeProxy();
        } elseif ($obj instanceof PersistentCollectionInterface) {
            $obj->initialize();
        }
    }
659677
public function add_inc($name, $obj){
		if ( !isset($this->inc->{$name}) ){
			$this->inc->{$name} = $obj;
		}
	}
301621
@Override
	public void externalizeCacheObjectAsync(final String fileNamePrefix, final Object object,
			final CreateCompletionCallback callback) {
		_aggregator.getExecutors().getFileCreateExecutor().submit(new Runnable() {
			File file = null;
			public void run() {
				try {
					file = File.createTempFile(fileNamePrefix, ".cache", _directory); //$NON-NLS-1$
					ObjectOutputStream os;
					os = new ObjectOutputStream(new FileOutputStream(file));
					try {
						os.writeObject(object);
					} finally {
						try { os.close(); } catch (Exception ignore) {}
					}
					if (callback != null) {
						callback.completed(file.getName(), null);
					}
				} catch (IOException e) {
					if (log.isLoggable(Level.WARNING))
						log.log(Level.WARNING, MessageFormat.format(
								Messages.CacheManagerImpl_4, new Object[]{file.getPath()}), e);
					if (callback != null) {
						callback.completed(file != null ? file.getName() : null, e);
					}
				}
			}
		});
	}
770739
public function setCache(FrontendInterface $cache)
    {
        $this->cache = $cache;
        $this->cacheIdentifier = $this->cache->getIdentifier();
    }