Page Menu
Home
WickedGov Phorge
Search
Configure Global Search
Log In
Files
F5953707
CaptchaCacheStore.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
CaptchaCacheStore.php
View Options
<?php
namespace
MediaWiki\Extension\ConfirmEdit\Store
;
use
MediaWiki\MediaWikiServices
;
use
Wikimedia\ObjectCache\BagOStuff
;
class
CaptchaCacheStore
extends
CaptchaStore
{
/** @var BagOStuff */
private
$store
;
public
function
__construct
()
{
parent
::
__construct
();
$this
->
store
=
MediaWikiServices
::
getInstance
()->
getMicroStash
();
}
/** @inheritDoc */
public
function
store
(
$index
,
$info
)
{
global
$wgCaptchaSessionExpiration
;
$this
->
store
->
set
(
$this
->
store
->
makeKey
(
'captcha'
,
$index
),
$info
,
$wgCaptchaSessionExpiration
,
// Assume the write action will reach the primary DC before the user sends the
// HTTP POST request attempted to solve the captcha and perform an action
$this
->
store
::
WRITE_BACKGROUND
);
}
/** @inheritDoc */
public
function
retrieve
(
$index
)
{
return
$this
->
store
->
get
(
$this
->
store
->
makeKey
(
'captcha'
,
$index
)
);
}
/** @inheritDoc */
public
function
clear
(
$index
)
{
$this
->
store
->
delete
(
$this
->
store
->
makeKey
(
'captcha'
,
$index
)
);
}
/** @inheritDoc */
public
function
cookiesNeeded
()
{
return
false
;
}
}
File Metadata
Details
Attached
Mime Type
text/x-php
Expires
Sat, Oct 3, 02:19 (4 w, 19 h ago)
Storage Engine
local-disk
Storage Format
Raw Data
Storage Handle
0c/02/3ce5d20b98dc4d730f306fcd1d3f
Default Alt Text
CaptchaCacheStore.php (1 KB)
Attached To
Mode
rMWPROD MediaWiki Production
Attached
Detach File
Event Timeline
Log In to Comment