Set cache

@param $useCache
@param $tableTTL
@param \Slab\Components\Cache\DriverInterface $cacheObject
@return $this
774416
public function setCache($useCache, $tableTTL, \Slab\Components\Cache\DriverInterface $cacheObject)
    {
        $this->cacheInterface = $cacheObject;
        $this->cacheTTL = $tableTTL;
        $this->enableCache = $useCache;

        return $this;
    }
1123347
public void setCache(String cacheName, String cacheKey, Object object) {
        Cache cache = cacheManager.getCache(cacheName);
        if (cache == null) {
            return;
        }
        cache.put(new Element(cacheKey, object));
    }
329462
private static function setCachedActionRow($idAction, $actionType, $actionRow)
    {
        $cacheLabel = self::getCachedActionRowKey($idAction, $actionType);
        self::$cacheParsedAction[$cacheLabel] = $actionRow;
    }
1095103
public function useResultCache(string $cacheKey = null, int $ttl = 0): self
    {
        if (null === $cacheKey) {
            $this->cacheProfile = null;
        } else {
            $this->cacheProfile = new SearchCacheProfile($cacheKey, $ttl);
        }

        return $this;
    }
1170237
protected function templateCacheSetup($templateCache) {
    $cacheDir = $templateCache;
    if ($templateCache === null) {
      $cacheDir = sys_get_temp_dir() . DIRECTORY_SEPARATOR . "jcalderonzumba" . DIRECTORY_SEPARATOR . "phantomjs";
      if (!file_exists($cacheDir)) {
        mkdir($cacheDir, 0777, true);
      }
    }

    if (!file_exists($cacheDir)) {
      throw new DriverException("Template cache $cacheDir directory does not exist");
    }
    return $cacheDir;
  }
488689
public static function setDoctrineCache(DoctrineCacheProvider $cache)
    {
        self::$cacheImplementation = new DoctrineCache($cache);
        self::$hasBeenCleared      = false;
    }
878935
public function setResultCacheDriver($resultCacheDriver = null)
    {
        if ($resultCacheDriver !== null && ! ($resultCacheDriver instanceof \Doctrine\Common\Cache\Cache)) {
            throw ORMException::invalidResultCacheDriver();
        }

        $this->_queryCacheProfile = $this->_queryCacheProfile
            ? $this->_queryCacheProfile->setResultCacheDriver($resultCacheDriver)
            : new QueryCacheProfile(0, null, $resultCacheDriver);

        return $this;
    }
1324807
public function setCache(\Psr\SimpleCache\CacheInterface $cache, $key, $ttl = 86400)
    {
        $this->cache = $cache;
        $this->cacheKey = $key;
        $this->cacheTime = $ttl;

        if (empty($this->cacheKey))
        {
            $this->cacheKey = 'concatenate-'.md5(serialize($this));
        }

        return $this;
    }
603351
protected function setCompression(bool $useCompression)
    {
        if ($this->memcache instanceof \Memcached) {
            $this->memcache->setOption(\Memcached::OPT_COMPRESSION, $useCompression);
            return;
        }
        if ($useCompression === true) {
            $this->flags ^= MEMCACHE_COMPRESSED;
        } else {
            $this->flags &= ~MEMCACHE_COMPRESSED;
        }
    }
343215
public function useResultCache($bool, $lifetime = null, $resultCacheId = null)
    {
        if ($bool) {
            $this->setResultCacheLifetime($lifetime);
            $this->setResultCacheId($resultCacheId);

            return $this;
        }

        $this->_queryCacheProfile = null;

        return $this;
    }
457582
public function get_tables($usecache = true) {
        if ($usecache and $this->tables !== null) {
            return $this->tables;
        }
        $this->tables = array ();
        $prefix = str_replace('_', '\\_', $this->prefix);
        $sql = "SELECT table_name
                  FROM INFORMATION_SCHEMA.TABLES
                 WHERE table_name LIKE '$prefix%' ESCAPE '\\' AND table_type = 'BASE TABLE'";

        $this->query_start($sql, null, SQL_QUERY_AUX);
        $result = sqlsrv_query($this->sqlsrv, $sql);
        $this->query_end($result);

        if ($result) {
            while ($row = sqlsrv_fetch_array($result)) {
                $tablename = reset($row);
                if ($this->prefix !== false && $this->prefix !== '') {
                    if (strpos($tablename, $this->prefix) !== 0) {
                        continue;
                    }
                    $tablename = substr($tablename, strlen($this->prefix));
                }
                $this->tables[$tablename] = $tablename;
            }
            $this->free_result($result);
        }

        // Add the currently available temptables
        $this->tables = array_merge($this->tables, $this->temptables->get_temptables());
        return $this->tables;
    }
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;
	}
}
812914
public function setCache($cache, $namespace = null)
    {
        if($cache && ClassRegistryCache::isSupported())
        {
            $this->__registry = new ClassRegistryCache();

            if($namespace) {
                $this->__registry->setNamespace($namespace);
            }
        }
        else
        {
            if(!$this->__registry instanceof ClassRegistry) {
                $this->__registry = new ClassRegistry();
            }
        }

        return $this;
    }
388158
public function setUseFramework(string $use_framework = "F") : CNabuDataObject
    {
        if ($use_framework === null) {
            throw new ENabuCoreException(
                    ENabuCoreException::ERROR_NULL_VALUE_NOT_ALLOWED_IN,
                    array("\$use_framework")
            );
        }
        $this->setValue('nb_site_use_framework', $use_framework);
        
        return $this;
    }
469528
private static function setCache(Cache &$cacheToChange = null, Cache $cache = null, $namespace = null)
    {
        if ($namespace === null) {
            $namespace = self::$cacheDefaultNamespace;
        }
        if (!is_string($namespace)) {
            throw new \InvalidArgumentException("The namespace must be a string.");
        }

        $cacheToChange = $cache;
        if ($cache !== null) {
            $cacheToChange->setNamespace($namespace);
        }
    }
1328086
public function setCache(FrontendInterface $cache)
    {
        parent::setCache($cache);
        if ($this->configuration->isBool('renameTablesToOtherPrefix')) {
            $this->cacheTable = 'sfc_' . $this->cacheIdentifier;
            $this->tagsTable = 'sfc_' . $this->cacheIdentifier . '_tags';
        }
    }
652637
protected function setToCache($cacheKey, $value, $ttl = null)
    {
        // Seralize as JSON to ensure array etc can be stored
        $value = Convert::raw2json($value);

        return $this->getCache()->set($cacheKey, $value, $ttl);
    }