Beispiel #1
0
 private function cacheFeature($featureName, \SplitIO\Grammar\Split $split)
 {
     $ikey = $this->getSmKey($featureName);
     try {
         return SharedMemory::write($ikey, $split, $this->smTtl, $this->smMode, $this->smSize);
     } catch (SupportSharedMemoryException $se) {
         SplitApp::logger()->warning($se->getMessage());
     } catch (OpenSharedMemoryException $oe) {
         SplitApp::logger()->error($oe->getMessage());
     } catch (WriteSharedMemoryException $we) {
         SplitApp::logger()->error($we->getMessage());
     } catch (\Exception $e) {
         SplitApp::logger()->error($e->getMessage());
     }
     return false;
 }
Beispiel #2
0
 /**
  * @param $segmentName
  * @param $key
  * @param $value
  * @return bool
  */
 private function cacheSegmentEvaluation($segmentName, $key, $value)
 {
     $ikey = $this->getSmKey($segmentName, $key);
     try {
         return SharedMemory::write($ikey, $value, $this->smTtl, $this->smMode, $this->smSize);
     } catch (SupportSharedMemoryException $se) {
         SplitApp::logger()->warning($se->getMessage());
     } catch (OpenSharedMemoryException $oe) {
         SplitApp::logger()->error($oe->getMessage());
     } catch (WriteSharedMemoryException $we) {
         SplitApp::logger()->error($we->getMessage());
     } catch (\Exception $e) {
         SplitApp::logger()->error($e->getMessage());
     }
     return false;
 }