Commit graph

7 commits

Author SHA1 Message Date
Reedy 36bd54e4ec FancyCaptcha: Allow configuration of the actual directory captchas are stored in
Change-Id: Iecc48db5237adc5b89c99019faac0af425e4eb5d
2024-01-15 15:43:46 +00:00
Derick Alangi 6f2fbd1d00 Store: Use the MicroStash store only and drop dead code
In this patch, we can now make use of MicroStash only and
drop dead code.

At this point, we're sure that there are no captchas in the
main stash, freeing up this memory for other requests to use.

Bug: T336004
Change-Id: I6aa69636f2f94e3bd18afc66eac37146d00771d1
2023-12-19 14:45:50 +00:00
Umherirrender 92bc1f3d2f Use namespaced classes
Changes to the use statements done automatically via script
Addition of missing use statements done manually

Change-Id: Id44f211320e56bc83e4c8f243369dc4eb562cf37
2023-12-11 00:07:55 +01:00
Derick Alangi bb201b86e4
Store: Enable ConfirmEdit to use MicroStash for captcha storage
ConfirmEdit uses MainStash as the backend to write its captchas. We
are migrating this extension to use the MicroStash store instead which
is more suitable.

This patch will store the captcha in MicroStash, read it from there
or fallback to MainStash if lookup was not successful. The code will
then clear both stores once after processing.

Migration plan
==============

step .1: Write to microstash store only, read from it or
         fallback to mainstash store. Then delete from
         both backends.

step .2: Read from microstash store only, delete from the
         microstash store, and remove dead code afterward.

Bug: T336004
Change-Id: Ie7c50a6efe7a0aefc97a712b2ad961e7837cc4cf
2023-11-29 11:35:45 +01:00
Daimona Eaytoy 364b71f3ec Replace deprecated MWException
Also avoid throwing Exception directly and use RuntimeException instead,
not documenting it with @throws as it's unchecked, as per
https://www.mediawiki.org/wiki/Manual:Coding_conventions/PHP#Exception_handling.

Bug: T328220
Change-Id: I19df0e7e66d1e421d038109b9d2db9c0b63c709c
2023-06-07 17:44:23 +02:00
Aaron Schulz 61d8028d69 Use WRITE_BACKGROUND in CaptchaCacheStore and rename "cache" to "store"
This lays some groundwork for migrating from the main stash to a future
stash that resides in the primary datacenter.

Bug: T336004
Change-Id: I70ee88e9371af19890cb9e3da612d2bb7dc335e8
2023-06-06 12:59:42 -07:00
Reedy 30cd1d8a23 Namespace base classes
Change-Id: I3fa9747e0ea970c5de39e2da8603e1bba9388a69
2022-07-30 18:13:03 +00:00