- 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