mediawiki-extensions-Confir.../includes/store/CaptchaCacheStore.php
Umherirrender 8a3c51b1db Move classes to own files
Makes MediaWiki.Files.OneClassPerFile.MultipleFound pass

Change-Id: I88b5112d84d8983e67be1bca9f4039486bcefc6f
2017-12-16 13:32:46 +01:00

31 lines
606 B
PHP

<?php
class CaptchaCacheStore extends CaptchaStore {
function store( $index, $info ) {
global $wgCaptchaSessionExpiration;
ObjectCache::getMainStashInstance()->set(
wfMemcKey( 'captcha', $index ),
$info,
$wgCaptchaSessionExpiration
);
}
function retrieve( $index ) {
$info = ObjectCache::getMainStashInstance()->get( wfMemcKey( 'captcha', $index ) );
if ( $info ) {
return $info;
} else {
return false;
}
}
function clear( $index ) {
ObjectCache::getMainStashInstance()->delete( wfMemcKey( 'captcha', $index ) );
}
function cookiesNeeded() {
return false;
}
}