Adding a urlMap option

the ulrMap option is a function that returns a string that is saved as the key in the template cache. The default behaviour is still like before