{"action":"created","issue":{"url":"https://api.github.com/repos/yiisoft/yii2/issues/11734","repository_url":"https://api.github.com/repos/yiisoft/yii2","labels_url":"https://api.github.com/repos/yiisoft/yii2/issues/11734/labels{/name}","comments_url":"https://api.github.com/repos/yiisoft/yii2/issues/11734/comments","events_url":"https://api.github.com/repos/yiisoft/yii2/issues/11734/events","html_url":"https://github.com/yiisoft/yii2/issues/11734","id":159486946,"number":11734,"title":"Enhacement for Query caching","user":{"login":"rtwent","id":9133661,"avatar_url":"https://avatars.githubusercontent.com/u/9133661?v=3","gravatar_id":"","url":"https://api.github.com/users/rtwent","html_url":"https://github.com/rtwent","followers_url":"https://api.github.com/users/rtwent/followers","following_url":"https://api.github.com/users/rtwent/following{/other_user}","gists_url":"https://api.github.com/users/rtwent/gists{/gist_id}","starred_url":"https://api.github.com/users/rtwent/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rtwent/subscriptions","organizations_url":"https://api.github.com/users/rtwent/orgs","repos_url":"https://api.github.com/users/rtwent/repos","events_url":"https://api.github.com/users/rtwent/events{/privacy}","received_events_url":"https://api.github.com/users/rtwent/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/yiisoft/yii2/labels/status:need%20more%20info","name":"status:need more info","color":"d4c5f9"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":5,"created_at":"2016-06-09T19:19:33Z","updated_at":"2016-06-10T17:22:16Z","closed_at":null,"body":"Is it possible to make query caching more simple, like laravell has: \r\nhttps://laravel.com/docs/4.2/queries#caching-queries\r\nJust:\r\n\r\n> ->remember($minutes)->get()\r\n\r\nInstead of closures in controllers (models). \r\n\r\nThe advantages of the absence of closures in controllers, as I think is obvious. Remembering in minutes (like laravell does) is not comfortable too (seconds will be the best decision).\r\n\r\nThe idea of **not an expert**: The injecting of Cache component to DAO or ActiveRecord is a bad idea, Can ActiveRecord use some trait as it does with yii\\base\\ArrayableTrait (toArray() method), but this trait will respond for caching and will have this closure one time. Instead of repeating closures hundreds of times in application.\r\n\r\nTHANK YOU"},"comment":{"url":"https://api.github.com/repos/yiisoft/yii2/issues/comments/225243285","html_url":"https://github.com/yiisoft/yii2/issues/11734#issuecomment-225243285","issue_url":"https://api.github.com/repos/yiisoft/yii2/issues/11734","id":225243285,"user":{"login":"rtwent","id":9133661,"avatar_url":"https://avatars.githubusercontent.com/u/9133661?v=3","gravatar_id":"","url":"https://api.github.com/users/rtwent","html_url":"https://github.com/rtwent","followers_url":"https://api.github.com/users/rtwent/followers","following_url":"https://api.github.com/users/rtwent/following{/other_user}","gists_url":"https://api.github.com/users/rtwent/gists{/gist_id}","starred_url":"https://api.github.com/users/rtwent/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rtwent/subscriptions","organizations_url":"https://api.github.com/users/rtwent/orgs","repos_url":"https://api.github.com/users/rtwent/repos","events_url":"https://api.github.com/users/rtwent/events{/privacy}","received_events_url":"https://api.github.com/users/rtwent/received_events","type":"User","site_admin":false},"created_at":"2016-06-10T17:22:16Z","updated_at":"2016-06-10T17:22:16Z","body":"> Absolutely. Do you have time for it?\r\nI'll try to help You, but it will be not fast."}}
{"actor":{"display_login":"rtwent"}}