@@ -4183,75 +4183,76 @@ public static function macroCall($method, $parameters)
41834183 return $instance->macroCall($method, $parameters);
41844184 }
41854185 /**
4186- * Remove all items from the cache .
4186+ * Get a lock instance .
41874187 *
4188- * @return bool
4188+ * @param string $name
4189+ * @param int $seconds
4190+ * @param string|null $owner
4191+ * @return \Illuminate\Contracts\Cache\Lock
41894192 * @static
41904193 */
4191- public static function flush( )
4194+ public static function lock($name, $seconds = 0, $owner = null )
41924195 {
4193- /** @var \Illuminate\Cache\FileStore $instance */
4194- return $instance->flush( );
4196+ /** @var \Illuminate\Cache\DatabaseStore $instance */
4197+ return $instance->lock($name, $seconds, $owner );
41954198 }
41964199 /**
4197- * Get the Filesystem instance.
4200+ * Restore a lock instance using the owner identifier .
41984201 *
4199- * @return \Illuminate\Filesystem\Filesystem
4202+ * @param string $name
4203+ * @param string $owner
4204+ * @return \Illuminate\Contracts\Cache\Lock
42004205 * @static
42014206 */
4202- public static function getFilesystem( )
4207+ public static function restoreLock($name, $owner )
42034208 {
4204- /** @var \Illuminate\Cache\FileStore $instance */
4205- return $instance->getFilesystem( );
4209+ /** @var \Illuminate\Cache\DatabaseStore $instance */
4210+ return $instance->restoreLock($name, $owner );
42064211 }
42074212 /**
4208- * Get the working directory of the cache.
4213+ * Remove all items from the cache.
42094214 *
4210- * @return string
4215+ * @return bool
42114216 * @static
42124217 */
4213- public static function getDirectory ()
4218+ public static function flush ()
42144219 {
4215- /** @var \Illuminate\Cache\FileStore $instance */
4216- return $instance->getDirectory ();
4220+ /** @var \Illuminate\Cache\DatabaseStore $instance */
4221+ return $instance->flush ();
42174222 }
42184223 /**
4219- * Get the cache key prefix .
4224+ * Get the underlying database connection .
42204225 *
4221- * @return string
4226+ * @return \Illuminate\Database\MySqlConnection
42224227 * @static
42234228 */
4224- public static function getPrefix ()
4229+ public static function getConnection ()
42254230 {
4226- /** @var \Illuminate\Cache\FileStore $instance */
4227- return $instance->getPrefix ();
4231+ /** @var \Illuminate\Cache\DatabaseStore $instance */
4232+ return $instance->getConnection ();
42284233 }
42294234 /**
4230- * Get a lock instance .
4235+ * Specify the name of the connection that should be used to manage locks .
42314236 *
4232- * @param string $name
4233- * @param int $seconds
4234- * @param string|null $owner
4235- * @return \Illuminate\Contracts\Cache\Lock
4237+ * @param \Illuminate\Database\ConnectionInterface $connection
4238+ * @return \Illuminate\Cache\DatabaseStore
42364239 * @static
42374240 */
4238- public static function lock($name, $seconds = 0, $owner = null )
4241+ public static function setLockConnection($connection )
42394242 {
4240- /** @var \Illuminate\Cache\FileStore $instance */
4241- return $instance->lock($name, $seconds, $owner );
4243+ /** @var \Illuminate\Cache\DatabaseStore $instance */
4244+ return $instance->setLockConnection($connection );
42424245 }
42434246 /**
4244- * Restore a lock instance using the owner identifier .
4247+ * Get the cache key prefix .
42454248 *
4246- * @param string $name
4247- * @param string $owner
4248- * @return \Illuminate\Contracts\Cache\Lock
4249+ * @return string
42494250 * @static
42504251 */
4251- public static function restoreLock($name, $owner )
4252+ public static function getPrefix( )
42524253 {
4253- /** @var \Illuminate\Cache\FileStore $instance */
4254- return $instance->restoreLock($name, $owner );
4254+ /** @var \Illuminate\Cache\DatabaseStore $instance */
4255+ return $instance->getPrefix( );
42554256 }
42564257
42574258 }
0 commit comments