Save a chunk to the cache.

@param type            $type
@param type            $slotname
@param type            $version
@param null|ChunkModel $chunk
18822
public function saveToCache($type, $slotname, $version, ChunkModel $chunk = null)
    {
        $key = $this->getCacheKey($type, $slotname, $version);

        $this->cache->forever($key, $chunk);
    }
634897
public function store(Subscriber $subscription, $websiteId, $storeId, $type = null)
    {
        if (!$this->isEnabledForWebsite($websiteId)) {
            return false;
        }

        if (!$type) {
            $type = self::DEFAULT_TYPE;
        }

        $eventData = $subscription->getData();

        $this->saveEvent($websiteId, $storeId, $type, $subscription->getId(), $eventData);

        return true;
    }
768350
private function storeContent(ConverterInterface $converter, string $content, ?int $cachedVersion) : void
    {
        $iniString = $this->sanitizeContent($content);
        $iniVersion = $converter->getIniVersion($iniString);

        if (! $cachedVersion || $iniVersion > $cachedVersion) {
            $converter->storeVersion();
            $converter->convertString($iniString);
        }
    }
342845
public function put($filename,$content,$type=''){
        $dir         =  dirname($filename);
        if(!is_dir($dir)){
            mkdir($dir,0777,true);
        }
        if(false === file_put_contents($filename,$content)){
            E(L('_STORAGE_WRITE_ERROR_').':'.$filename);
        }else{
            $this->contents[$filename]=$content;
            return true;
        }
    }
1134763
public function isCached($type, $hash, $version)
    {
        // If the base file isn't cached we do not need to check the file names
        if (!isset($this->cachedFiles[$hash])) {
            return false;
        }
        
        $searchedFile = $this->buildFilePath($type, $hash, $version);
        foreach ($this->cachedFiles as $baseFileHash => $cachedFile) {
            if ($cachedFile['file'] === $searchedFile) {
                return true;
            }
        }
        
        return false;
    }
1048251
@SuppressWarnings("deprecation")
	@Override
	public <S extends T> S save(final S entity) {
		if (arangoOperations.getVersion().getVersion().compareTo("3.4.0") < 0) {
			arangoOperations.upsert(entity, UpsertStrategy.REPLACE);
		} else {
			arangoOperations.repsert(entity);
		}
		return entity;
	}
696935
public void setInterpreterCache(int version, Object toCache) {
    if (interpCache == null)
      // JMF_ENCODING_VERSION is always the latest version we support
      interpCache = new Object[JMFRegistry.JMF_ENCODING_VERSION];
    interpCache[version - 1] = toCache;
  }
12340
public function save($oldText, $newText, $data, $lifeTime = 0)
    {
        return $this->cacheProvider->save($this->getHashKey($oldText, $newText), $data, $lifeTime);
    }
911005
public T removeBundle(final String moduleName, final String slot, final byte[] existingHash) {
        final ContentItem item = createBundleItem(moduleName, slot, NO_CONTENT);
        addContentModification(createContentModification(item, ModificationType.REMOVE, existingHash));
        return returnThis();
    }
560701
public function writeVersion(Version $version)
    {
        $cacheItem = $this->cache->getItem('version');
        $cacheItem->set($version);

        $this->cache->save($cacheItem);
        $this->writer->write($version);
    }
1257641
public static function chunk($type, $slotname, $page = null)
    {
        return ChunkFacade::insert($type, $slotname, $page);
    }
1352412
public function storeFileReference(VersionInfo $versionInfo, Field $field)
    {
        $connection = $this->getConnection();

        $insertQuery = $connection->createInsertQuery();
        $insertQuery->insertInto(
            $connection->quoteTable($this->getStorageTable())
        );

        $this->setInsertColumns($insertQuery, $versionInfo, $field);

        $insertQuery->prepare()->execute();

        return false;
    }
419631
public function save($api, $class, $version, $cacheArray)
    {
        $cacheKey = md5($api . $class);

        if (!isset($this->cache[$cacheKey])) {
            $this->cache[$cacheKey] = [
                'api'     => $api,
                'class'   => $class,
                'version' => []
            ];
        }

        $this->cache[$cacheKey]['version'][$version] = $cacheArray;
    }
250871
public function create($name, $chunksPath, $storagePath, $token = null, $mimeType = null)
    {
        return new ChunkFile($name, $chunksPath, $storagePath, $token, $mimeType, $this->files);
    }
881169
public function useCache($type = self::CACHE_APC) {
    if ($type === self::CACHE_APC) {
      $this->setCache(new \Doctrine\Common\Cache\ApcCache);
    } else {
      $this->setCache(new \Doctrine\Common\Cache\ArrayCache);
    }
  }
134132
public function save( $fileName, $type = IMAGETYPE_PNG, $quality = 100 )
	{
		$this->saveImage( $fileName, $this->resource, $type, $quality );
	}
633180
private function saveToCache($part, $data)
    {
        if ($this->enableCaching) {
            $this->cache->set($this->buildKey($part), $data, $this->cacheDuration, new TagDependency([
                'tags' => $part
            ]));
        }
    }