Issue Task Closed

#99098Replace instance cache in FormProtectionFactory with runtime cache

Stefan Bürk 11/15/22, 21:10 updated 12/06/22, 21:41

Description

FormProtectionFactory is in transition to be fully
injectable, thus removing the old static instance
approach.

One showstopper to move on was the static property
cache for created instances, along with the need
to keep some protected methods static – with usage
in static and instanciated flavour.

Replaceing the static property instance cache with
the core runtime cache that knot would be solveable.

With that replacement, it would also be easier in
tests, and enforced clearing can be done by flushing
the runtime cache. Additionally, static `get()` and
`purgeInstances()` could be removed, and all of the
other static methods transformed into non-static variants.

Reviews 2