| @@ 99-120 (lines=22) @@ | ||
| 96 | ||
| 97 | $return = false; |
|
| 98 | ||
| 99 | } else { |
|
| 100 | ||
| 101 | $shadowName = $namespace."-".md5($name); |
|
| 102 | ||
| 103 | $shadowTtl = /* $this->getTime() + */$this->ttl; |
|
| 104 | ||
| 105 | $shadowData = serialize($data); |
|
| 106 | ||
| 107 | $return = $this->instance->set($shadowName, $shadowData, $shadowTtl); |
|
| 108 | ||
| 109 | if ( $return === false ) { |
|
| 110 | ||
| 111 | $this->logger->error("Error writing cache (Memcached), exiting gracefully", array( |
|
| 112 | "RESULTCODE" => $this->instance->getResultCode(), |
|
| 113 | "RESULTMESSAGE" => $this->instance->getResultMessage() |
|
| 114 | )); |
|
| 115 | ||
| 116 | $this->setErrorState("Error writing cache (Memcached)"); |
|
| 117 | ||
| 118 | } |
|
| 119 | ||
| 120 | } |
|
| 121 | ||
| 122 | } catch (CacheException $ce) { |
|
| 123 | ||
| @@ 115-133 (lines=19) @@ | ||
| 112 | ||
| 113 | $return = false; |
|
| 114 | ||
| 115 | } else { |
|
| 116 | ||
| 117 | $shadowName = $namespace."-".md5($name); |
|
| 118 | ||
| 119 | $shadowTtl = $this->ttl; |
|
| 120 | ||
| 121 | $shadowData = serialize($data); |
|
| 122 | ||
| 123 | $return = $this->instance->setex($shadowName, $shadowTtl, $shadowData); |
|
| 124 | ||
| 125 | if ( $return === false ) { |
|
| 126 | ||
| 127 | $this->logger->error("Error writing cache (PhpRedis), exiting gracefully", array( $this->instance->getLastError())); |
|
| 128 | ||
| 129 | $this->setErrorState("Error writing cache (PhpRedis)"); |
|
| 130 | ||
| 131 | } |
|
| 132 | ||
| 133 | } |
|
| 134 | ||
| 135 | } catch (RedisException $re ) { |
|
| 136 | ||