FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
cache/HasCacheLock.php at master · illuminate/cache · GitHub
Uh oh!
There was an error while loading.
Please reload this page
.
illuminate
/
cache
Public
Notifications
You must be signed in to change notification settings
Fork
25
Star
129
Code
Pull requests
0
Actions
Projects
Security and quality
0
Insights
Additional navigation options
Code
Pull requests
Actions
Projects
Security and quality
Insights
Expand file tree
Breadcrumbs
cache
/
HasCacheLock.php
Copy path
More file actions
More file actions
Latest commit
History
History
History
31 lines (28 loc) · 681 Bytes
Breadcrumbs
cache
/
HasCacheLock.php
Copy path
File metadata and controls
31 lines (28 loc) · 681 Bytes
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
<?php
namespace
Illuminate
\
Cache
;
trait
HasCacheLock
{
/**
* Get a lock instance.
*
* @param string $name
* @param int $seconds
* @param string|null $owner
* @return \Illuminate\Contracts\Cache\Lock
*/
public
function
lock
(
$
name
,
$
seconds
=
0
,
$
owner
=
null
)
{
return
new
CacheLock
(
$
this
,
$
name
,
$
seconds
,
$
owner
);
}
/**
* Restore a lock instance using the owner identifier.
*
* @param string $name
* @param string $owner
* @return \Illuminate\Contracts\Cache\Lock
*/
public
function
restoreLock
(
$
name
,
$
owner
)
{
return
$
this
->
lock
(
$
name
,
0
,
$
owner
);
}
}
Back
|
FazBrowse Home
|
New Git URL