Example #1
0
 /**
  * {@inheritdoc}
  */
 public function clear()
 {
     parent::clear();
     if (null !== $this->signalTimer) {
         $this->signalTimer->stop();
         $this->signalTimer = $this->timer($this->signalTimer->getInterval(), true, [$this->signalManager, 'tick']);
         $this->signalTimer->unreference();
     }
 }
Example #2
0
    /**
     * Removes all values.
     */
    public function clear()
    {
        $this->data = [];
        $this->expire = [];
        $this->ttl = [];

        $this->timer->stop();
        $this->queue = new \SplPriorityQueue();
    }