mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/ConfirmEdit
synced 2024-11-15 11:59:33 +00:00
5b7a36a521
Change-Id: Ie956fe86184535a376d0398483ac3c853fa9127c
31 lines
634 B
PHP
31 lines
634 B
PHP
<?php
|
|
|
|
class CaptchaCacheStore extends CaptchaStore {
|
|
public function store( $index, $info ) {
|
|
global $wgCaptchaSessionExpiration;
|
|
|
|
ObjectCache::getMainStashInstance()->set(
|
|
wfMemcKey( 'captcha', $index ),
|
|
$info,
|
|
$wgCaptchaSessionExpiration
|
|
);
|
|
}
|
|
|
|
public function retrieve( $index ) {
|
|
$info = ObjectCache::getMainStashInstance()->get( wfMemcKey( 'captcha', $index ) );
|
|
if ( $info ) {
|
|
return $info;
|
|
} else {
|
|
return false;
|
|
}
|
|
}
|
|
|
|
public function clear( $index ) {
|
|
ObjectCache::getMainStashInstance()->delete( wfMemcKey( 'captcha', $index ) );
|
|
}
|
|
|
|
public function cookiesNeeded() {
|
|
return false;
|
|
}
|
|
}
|