Ejemplo n.º 1
0
 /**
  * Store an item in the cache.
  *
  * @param  string  $key
  * @param  mixed   $value
  * @param  \DateTime|int  $minutes
  * @return void
  */
 public function put($key, $value, $minutes)
 {
     $minutes = $this->getMinutes($minutes);
     if (!is_null($minutes)) {
         $this->store->put($key, $value, $minutes);
     }
 }
Ejemplo n.º 2
0
 /**
  * Increments the number of calls on the flywheel.
  *
  * @param $name
  * @param $interval
  * @return $this
  */
 public function incrementCalls($name, $interval)
 {
     $calls = 1 + $this->getCalls($name, $interval);
     $time = microtime(true);
     $this->data[$name] = array($calls, $time);
     $this->cache->put('flywheel:' . $name, implode(',', $this->data[$name]), ceil($interval / 60));
     return $this;
 }
Ejemplo n.º 3
0
 /**
  * Store an item in the cache.
  *
  * @param  string  $key
  * @param  mixed   $value
  * @param  \DateTime|int  $minutes
  * @return void
  */
 public function put($key, $value, $minutes)
 {
     $minutes = $this->getMinutes($minutes);
     if (!is_null($minutes)) {
         $this->store->put($key, $value, $minutes);
         $this->fireCacheEvent('write', [$key, $value, $minutes]);
     }
 }
Ejemplo n.º 4
0
 /**
  * Store an item in the cache.
  *
  * @param  string  $key
  * @param  mixed   $value
  * @param  \DateTime|int  $minutes
  * @return void
  */
 public function put($key, $value, $minutes)
 {
     $minutes = $this->getMinutes($minutes);
     $this->store->put($key, $value, $minutes);
 }
Ejemplo n.º 5
0
 /**
  * Store an item in the cache for a given number of minutes.
  *
  * @param  string  $key
  * @param  mixed   $value
  * @param  int     $minutes
  * @return void
  */
 public function put($key, $value, $minutes)
 {
     return $this->store->put($this->taggedItemKey($key), $value, $minutes);
 }