{"action":"created","issue":{"url":"https://api.github.com/repos/xnagpa/thinknetica_training_project/issues/17","labels_url":"https://api.github.com/repos/xnagpa/thinknetica_training_project/issues/17/labels{/name}","comments_url":"https://api.github.com/repos/xnagpa/thinknetica_training_project/issues/17/comments","events_url":"https://api.github.com/repos/xnagpa/thinknetica_training_project/issues/17/events","html_url":"https://github.com/xnagpa/thinknetica_training_project/pull/17","id":103873953,"number":17,"title":"Adds caching","user":{"login":"xnagpa","id":4035895,"avatar_url":"https://avatars.githubusercontent.com/u/4035895?v=3","gravatar_id":"","url":"https://api.github.com/users/xnagpa","html_url":"https://github.com/xnagpa","followers_url":"https://api.github.com/users/xnagpa/followers","following_url":"https://api.github.com/users/xnagpa/following{/other_user}","gists_url":"https://api.github.com/users/xnagpa/gists{/gist_id}","starred_url":"https://api.github.com/users/xnagpa/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/xnagpa/subscriptions","organizations_url":"https://api.github.com/users/xnagpa/orgs","repos_url":"https://api.github.com/users/xnagpa/repos","events_url":"https://api.github.com/users/xnagpa/events{/privacy}","received_events_url":"https://api.github.com/users/xnagpa/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-08-29T19:48:13Z","updated_at":"2015-08-30T08:56:21Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/xnagpa/thinknetica_training_project/pulls/17","html_url":"https://github.com/xnagpa/thinknetica_training_project/pull/17","diff_url":"https://github.com/xnagpa/thinknetica_training_project/pull/17.diff","patch_url":"https://github.com/xnagpa/thinknetica_training_project/pull/17.patch"},"body":""},"comment":{"url":"https://api.github.com/repos/xnagpa/thinknetica_training_project/issues/comments/136100099","html_url":"https://github.com/xnagpa/thinknetica_training_project/pull/17#issuecomment-136100099","issue_url":"https://api.github.com/repos/xnagpa/thinknetica_training_project/issues/17","id":136100099,"user":{"login":"vkurennov","id":968537,"avatar_url":"https://avatars.githubusercontent.com/u/968537?v=3","gravatar_id":"","url":"https://api.github.com/users/vkurennov","html_url":"https://github.com/vkurennov","followers_url":"https://api.github.com/users/vkurennov/followers","following_url":"https://api.github.com/users/vkurennov/following{/other_user}","gists_url":"https://api.github.com/users/vkurennov/gists{/gist_id}","starred_url":"https://api.github.com/users/vkurennov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vkurennov/subscriptions","organizations_url":"https://api.github.com/users/vkurennov/orgs","repos_url":"https://api.github.com/users/vkurennov/repos","events_url":"https://api.github.com/users/vkurennov/events{/privacy}","received_events_url":"https://api.github.com/users/vkurennov/received_events","type":"User","site_admin":false},"created_at":"2015-08-30T08:56:21Z","updated_at":"2015-08-30T08:56:21Z","body":"Задание я приму, но есть 2 тонких момента:\r\n\r\n - Паршалы тоже надо кешировать\r\n - При кешировании проверки типа can? или на то залогинен пользователь или нет, сработают только в первый раз, т.к. затем это будет статический контент, в котором никакие действия и проверки не совершаются, просто отдается готовый html. Поэтому, если, например, шаблон закешировался для незалогиненного пользователя, то когда зайдет залогиненный он будет видеть все так же, как и не залогиненный. Тут несколько выходов: 1) кашировать все, а потом через js добавлять нужные ссылки. 2) Кешировать только статические фрагменты. Т.е если ссылка появляется по условию, то саму ссылку кешируем, а проверку - нет. Кашировать только некоторые фрагменты (тело вопроса/ответа и т.п.), а проверки и ссылки - не кешировать."}}