Ejemplo n.º 1
0
 /**
  * Get an item (may be cached)
  *
  * @param User $user
  * @param LinkTarget $target
  *
  * @return WatchedItem|false
  */
 public function getWatchedItem(User $user, LinkTarget $target)
 {
     if ($user->isAnon()) {
         return false;
     }
     $cached = $this->getCached($user, $target);
     if ($cached) {
         $this->stats->increment('WatchedItemStore.getWatchedItem.cached');
         return $cached;
     }
     $this->stats->increment('WatchedItemStore.getWatchedItem.load');
     return $this->loadWatchedItem($user, $target);
 }
Ejemplo n.º 2
0
 /**
  * @inherit
  **/
 function produceStatsdData($key, $value = 1, $metric = StatsdDataInterface::STATSD_METRIC_COUNT)
 {
     return $this->factory->produceStatsdData($key, $value, $metric);
 }
Ejemplo n.º 3
0
 /**
  * {@inheritdoc}
  */
 public function updateCount($key, $delta)
 {
     $this->appendToBuffer($this->factory->updateCount($key, $delta));
     return $this;
 }