Page Menu
Home
WickedGov Phorge
Search
Configure Global Search
Log In
Files
F4047528
EmptyBagOStuff.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
EmptyBagOStuff.php
View Options
<?php
/**
* @license GPL-2.0-or-later
* @file
*/
namespace
Wikimedia\ObjectCache
;
/**
* No-op implementation that stores nothing.
*
* Used as placeholder or fallback when disabling caching.
*
* This can be used in configuration via the CACHE_NONE constant.
*
* @ingroup Cache
*/
class
EmptyBagOStuff
extends
MediumSpecificBagOStuff
{
public
function
__construct
(
array
$params
=
[]
)
{
parent
::
__construct
(
$params
);
$this
->
attrMap
[
self
::
ATTR_DURABILITY
]
=
self
::
QOS_DURABILITY_NONE
;
}
/** @inheritDoc */
protected
function
doGet
(
$key
,
$flags
=
0
,
&
$casToken
=
null
)
{
$casToken
=
null
;
return
false
;
}
/** @inheritDoc */
protected
function
doSet
(
$key
,
$value
,
$exptime
=
0
,
$flags
=
0
)
{
return
true
;
}
/** @inheritDoc */
protected
function
doDelete
(
$key
,
$flags
=
0
)
{
return
true
;
}
/** @inheritDoc */
protected
function
doAdd
(
$key
,
$value
,
$exptime
=
0
,
$flags
=
0
)
{
return
true
;
}
/** @inheritDoc */
protected
function
doIncrWithInit
(
$key
,
$exptime
,
$step
,
$init
,
$flags
)
{
// faster
return
$init
;
}
/** @inheritDoc */
public
function
merge
(
$key
,
callable
$callback
,
$exptime
=
0
,
$attempts
=
10
,
$flags
=
0
)
{
// faster
return
true
;
}
}
/** @deprecated class alias since 1.43 */
class_alias
(
EmptyBagOStuff
::
class
,
'EmptyBagOStuff'
);
File Metadata
Details
Attached
Mime Type
text/x-php
Expires
Aug 15 2026, 12:30 (14 w, 6 d ago)
Storage Engine
local-disk
Storage Format
Raw Data
Storage Handle
cc/4f/35bbe727effe5e48666e0cae29dd
Default Alt Text
EmptyBagOStuff.php (1 KB)
Attached To
Mode
rMWPROD MediaWiki Production
Attached
Detach File
Event Timeline
Log In to Comment