コード例 #1
0
ファイル: Client.php プロジェクト: splitio/php-client
 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;
 }
コード例 #2
0
ファイル: Segment.php プロジェクト: splitio/php-client
 /**
  * @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;
 }