summaryrefslogtreecommitdiff
path: root/www/wiki/extensions/ConfirmEdit/includes/store/CaptchaCacheStore.php
diff options
context:
space:
mode:
Diffstat (limited to 'www/wiki/extensions/ConfirmEdit/includes/store/CaptchaCacheStore.php')
-rw-r--r--www/wiki/extensions/ConfirmEdit/includes/store/CaptchaCacheStore.php30
1 files changed, 30 insertions, 0 deletions
diff --git a/www/wiki/extensions/ConfirmEdit/includes/store/CaptchaCacheStore.php b/www/wiki/extensions/ConfirmEdit/includes/store/CaptchaCacheStore.php
new file mode 100644
index 00000000..d6661b3c
--- /dev/null
+++ b/www/wiki/extensions/ConfirmEdit/includes/store/CaptchaCacheStore.php
@@ -0,0 +1,30 @@
+<?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;
+ }
+}