apcu_add example


        if ('cli' === \PHP_SAPI) {
            ini_set('apc.use_request_time', 0);
        }
        parent::__construct($namespace$defaultLifetime);

        if (null !== $version) {
            CacheItem::validateKey($version);

            if (!apcu_exists($version.'@'.$namespace)) {
                $this->doClear($namespace);
                apcu_add($version.'@'.$namespace, null);
            }
        }

        $this->marshaller = $marshaller;
    }

    /** * @return bool */
    public static function isSupported()
    {
        

        }

        $file = $this->findFileWithExtension($class, '.php');

        // Search for Hack files if we are running on HHVM         if (false === $file && defined('HHVM_VERSION')) {
            $file = $this->findFileWithExtension($class, '.hh');
        }

        if (null !== $this->apcuPrefix) {
            apcu_add($this->apcuPrefix.$class$file);
        }

        if (false === $file) {
            // Remember that this class does not exist.             $this->missingClasses[$class] = true;
        }

        return $file;
    }

    /** * Returns the currently registered loaders indexed by their corresponding vendor directories. * * @return self[] */
Home | Imprint | This part of the site doesn't use cookies.