2 class CaptchaSessionStore {
4 function store( $index, $info ) {
5 $_SESSION['captcha' . $info['index']] = $info;
8 function retrieve( $index ) {
9 if ( isset( $_SESSION['captcha' . $index] ) ) {
10 return $_SESSION['captcha' . $index];
16 function clear( $index ) {
17 unset( $_SESSION['captcha' . $index] );
20 function cookiesNeeded() {
25 class CaptchaCacheStore {
27 function store( $index, $info ) {
28 global $wgMemc, $wgCaptchaSessionExpiration;
29 $wgMemc->set( wfMemcKey( 'captcha', $index ), $info,
30 $wgCaptchaSessionExpiration );
33 function retrieve( $index ) {
35 $info = $wgMemc->get( wfMemcKey( 'captcha', $index ) );
43 function clear( $index ) {
45 $wgMemc->delete( wfMemcKey( 'captcha', $index ) );
48 function cookiesNeeded() {