/** * 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); } }
/** * 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; }
/** * 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]); } }
/** * 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); }
/** * 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); }