Added memoize service and use it in twig extension

__Tasks:__

- [ ] test coverage
- [ ] gather feedback for my changes
- [ ] submit changes to the documentation


__Informations:__

| Q             | A
| ------------- | ---
| Tests pass?   | yey
| Fixed tickets | none
| BC Breaks     | none
| Doc           | TODO