Пример #1
0
 protected function getKs()
 {
     $ks = parent::getKs();
     foreach ($this->_params as $key => $value) {
         if (is_numeric($key) && is_array($value) && array_key_exists('ks', $value)) {
             $curKs = $value['ks'];
             if (strpos($curKs, ':result') !== false) {
                 continue;
             }
             // the ks is the result of some sub request
             if ($ks && $ks != $curKs) {
                 return false;
             }
             // several different ks's in a multirequest - don't use cache
             $ks = $curKs;
             unset($this->_params[$key]['ks']);
             continue;
         }
         if (!preg_match('/[\\d]+:ks/', $key)) {
             continue;
         }
         // not a ks
         if (strpos($value, ':result') !== false) {
             continue;
         }
         // the ks is the result of some sub request
         if ($ks && $ks != $value) {
             return false;
         }
         // several different ks's in a multirequest - don't use cache
         $ks = $value;
         unset($this->_params[$key]);
     }
     return $ks;
 }
Пример #2
0
 protected function getKs()
 {
     $ks = parent::getKs();
     foreach ($this->_params as $key => $value) {
         if (!preg_match('/[\\d]+:ks/', $key)) {
             continue;
         }
         // not a ks
         if (strpos($value, ':result') !== false) {
             continue;
         }
         // the ks is the result of some sub request
         if ($ks && $ks != $value) {
             return false;
         }
         // several different ks's in a multirequest - don't use cache
         $ks = $value;
         unset($this->_params[$key]);
     }
     return $ks;
 }