- added caching for thymleaf question preview

- some cleanup of code
- added cache rest controller to remove all caches

(cherry picked from commit 3ecec3f5)
1 job for master in 2 minutes and 16 seconds
Status Name Job ID Coverage
  Deploy Artifacts
passed gesis-docker #35869

00:02:16