{"action":"created","issue":{"url":"https://api.github.com/repos/getkirby/kirby/issues/496","repository_url":"https://api.github.com/repos/getkirby/kirby","labels_url":"https://api.github.com/repos/getkirby/kirby/issues/496/labels{/name}","comments_url":"https://api.github.com/repos/getkirby/kirby/issues/496/comments","events_url":"https://api.github.com/repos/getkirby/kirby/issues/496/events","html_url":"https://github.com/getkirby/kirby/issues/496","id":178405891,"number":496,"title":"Caching not working with static::render in routes definition","user":{"login":"isjackwild","id":5766159,"avatar_url":"https://avatars.githubusercontent.com/u/5766159?v=3","gravatar_id":"","url":"https://api.github.com/users/isjackwild","html_url":"https://github.com/isjackwild","followers_url":"https://api.github.com/users/isjackwild/followers","following_url":"https://api.github.com/users/isjackwild/following{/other_user}","gists_url":"https://api.github.com/users/isjackwild/gists{/gist_id}","starred_url":"https://api.github.com/users/isjackwild/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/isjackwild/subscriptions","organizations_url":"https://api.github.com/users/isjackwild/orgs","repos_url":"https://api.github.com/users/isjackwild/repos","events_url":"https://api.github.com/users/isjackwild/events{/privacy}","received_events_url":"https://api.github.com/users/isjackwild/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2016-09-21T17:01:03Z","updated_at":"2016-09-21T17:29:19Z","closed_at":null,"body":"I'm using a static render method in a route definition to render some JSON from a page template and pass it into the home template.\r\n\r\n\r\n```\r\n$data = array();\r\n$data['initData'] = array(\r\n        'collection' => static::render($collection), // Render the start collection template JSON (site/templates/tour-dates.php)\r\n        'dates' => static::render($dates), // Render the Tour Dates template JSON (site/templates/tour-dates.php)\r\n        'slug' => $slug,\r\n      );\r\n\r\nreturn array('home', $data); // return the home page, passing in the dates and collection and initial slug data (site/templates/home.php);\r\n```\r\n\r\nThis is working perfectly — when I visit the site, the homepage template is rendered, and the data is passed into the template.\r\n\r\nHowever when I turn on caching (`c::set('cache', true);`), the collection page is rendered and returned and cached, rather than the homepage. (It will always return at the first static::render() it finds — so if I move dates above collections, it will return the dates page JSON."},"comment":{"url":"https://api.github.com/repos/getkirby/kirby/issues/comments/248683848","html_url":"https://github.com/getkirby/kirby/issues/496#issuecomment-248683848","issue_url":"https://api.github.com/repos/getkirby/kirby/issues/496","id":248683848,"user":{"login":"lukasbestle","id":1595007,"avatar_url":"https://avatars.githubusercontent.com/u/1595007?v=3","gravatar_id":"","url":"https://api.github.com/users/lukasbestle","html_url":"https://github.com/lukasbestle","followers_url":"https://api.github.com/users/lukasbestle/followers","following_url":"https://api.github.com/users/lukasbestle/following{/other_user}","gists_url":"https://api.github.com/users/lukasbestle/gists{/gist_id}","starred_url":"https://api.github.com/users/lukasbestle/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lukasbestle/subscriptions","organizations_url":"https://api.github.com/users/lukasbestle/orgs","repos_url":"https://api.github.com/users/lukasbestle/repos","events_url":"https://api.github.com/users/lukasbestle/events{/privacy}","received_events_url":"https://api.github.com/users/lukasbestle/received_events","type":"User","site_admin":false},"created_at":"2016-09-21T17:29:19Z","updated_at":"2016-09-21T17:29:19Z","body":"Could you please post a bit more context of and for your code? I don't really understand what you are trying to do?"}}
{"actor":{"display_login":"lukasbestle"}}