Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
syncEnrollments
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Yeray Santana Hualde
syncEnrollments
Commits
1d96b968
Commit
1d96b968
authored
Jul 07, 2011
by
Taylor Otwell
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Force memcached cache driver to return null as default.
parent
a29e76f2
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
12 deletions
+2
-12
memcached.php
system/cache/driver/memcached.php
+2
-12
No files found.
system/cache/driver/memcached.php
View file @
1d96b968
...
...
@@ -24,30 +24,20 @@ class Memcached implements \System\Cache\Driver {
* Get an item from the cache.
*
* @param string $key
* @param mixed $default
* @return mixed
*/
public
function
get
(
$key
,
$default
=
null
)
public
function
get
(
$key
)
{
// --------------------------------------------------
// If the item has already been loaded, return it.
// --------------------------------------------------
if
(
array_key_exists
(
$key
,
$this
->
items
))
{
return
$this
->
items
[
$key
];
}
// --------------------------------------------------
// Attempt to the get the item from cache.
// --------------------------------------------------
$cache
=
\System\Memcached
::
instance
()
->
get
(
\System\Config
::
get
(
'cache.key'
)
.
$key
);
// --------------------------------------------------
// Verify that the item was retrieved.
// --------------------------------------------------
if
(
$cache
===
false
)
{
return
$default
;
return
null
;
}
return
$this
->
items
[
$key
]
=
$cache
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment