Code Duplication    Length = 3-3 lines in 2 locations

include/classes/statscache.class.php 2 locations

@@ 42-44 (lines=3) @@
39
   **/
40
  public function set($key, $value, $expiration=NULL) {
41
    if (! $this->config['memcache']['enabled']) return $value;
42
    if (empty($expiration))
43
      $expiration = $this->config['memcache']['expiration'] + rand( -$this->config['memcache']['splay'], $this->config['memcache']['splay']);
44
    $this->debug->append("Storing " . $this->getRound() . '_' . $this->config['memcache']['keyprefix'] . "$key with expiration $expiration", 3);
45
    return $this->cache->set($this->getRound() . '_' . $this->config['memcache']['keyprefix'] . $key, $value, $expiration);
46
  }
47
@@ 54-56 (lines=3) @@
51
   **/
52
  public function setStaticCache($key, $value, $expiration=NULL) {
53
    if (! $this->config['memcache']['enabled']) return $value;
54
    if (empty($expiration))
55
      $expiration = $this->config['memcache']['expiration'] + rand( -$this->config['memcache']['splay'], $this->config['memcache']['splay']);
56
    $this->debug->append("Storing " . $this->config['memcache']['keyprefix'] . "$key with expiration $expiration", 3);
57
    if ($this->cache->set($this->config['memcache']['keyprefix'] . $key, $value, $expiration))
58
      return $value;
59
    return false;