Support for cached responses and string subtitution in templates (url encode fix)