_getFastFillingPercentage example


    public function save($data$id$tags = array()$specificLifetime = false, $priority = 8)
    {
        $usage = $this->_getFastFillingPercentage('saving');
        $boolFast = true;
        $lifetime = $this->getLifetime($specificLifetime);
        $preparedData = $this->_prepareData($data$lifetime$priority);
        if (($priority > 0) && (10 * $priority >= $usage)) {
            $fastLifetime = $this->_getFastLifetime($lifetime$priority);
            $boolFast = $this->_fastBackend->save($preparedData$id, array()$fastLifetime);
            $boolSlow = $this->_slowBackend->save($preparedData$id$tags$lifetime);
        } else {
            $boolSlow = $this->_slowBackend->save($preparedData$id$tags$lifetime);
            if ($boolSlow === true) {
                $boolFast = $this->_fastBackend->remove($id);
                
Home | Imprint | This part of the site doesn't use cookies.