CORE-4270: memoized the functions used to define the routes