{"action":"created","comment":{"url":"https://api.github.com/repos/inveniosoftware/invenio/pulls/comments/29278110","id":29278110,"diff_hunk":"@@ -0,0 +1,49 @@\n+# -*- coding: utf-8 -*-\n+#\n+# This file is part of Invenio.\n+# Copyright (C) 2015 CERN.\n+#\n+# Invenio is free software; you can redistribute it and/or\n+# modify it under the terms of the GNU General Public License as\n+# published by the Free Software Foundation; either version 2 of the\n+# License, or (at your option) any later version.\n+#\n+# Invenio is distributed in the hope that it will be useful, but\n+# WITHOUT ANY WARRANTY; without even the implied warranty of\n+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n+# General Public License for more details.\n+#\n+# You should have received a copy of the GNU General Public License\n+# along with Invenio; if not, write to the Free Software Foundation, Inc.,\n+# 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.\n+\n+\"\"\"Query results cacher.\"\"\"\n+\n+from invenio.modules.search.cache import get_results_cache, set_results_cache\n+\n+\n+class CacheOp(object):\n+\n+    \"\"\"Store results in cache.\"\"\"","path":"invenio/modules/search/enhancers/cache_results.py","position":27,"original_position":27,"commit_id":"ac3328015a4e47dfd8e3284a516ab61eba166548","original_commit_id":"ac3328015a4e47dfd8e3284a516ab61eba166548","user":{"login":"kaplun","id":119349,"avatar_url":"https://avatars.githubusercontent.com/u/119349?v=3","gravatar_id":"","url":"https://api.github.com/users/kaplun","html_url":"https://github.com/kaplun","followers_url":"https://api.github.com/users/kaplun/followers","following_url":"https://api.github.com/users/kaplun/following{/other_user}","gists_url":"https://api.github.com/users/kaplun/gists{/gist_id}","starred_url":"https://api.github.com/users/kaplun/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kaplun/subscriptions","organizations_url":"https://api.github.com/users/kaplun/orgs","repos_url":"https://api.github.com/users/kaplun/repos","events_url":"https://api.github.com/users/kaplun/events{/privacy}","received_events_url":"https://api.github.com/users/kaplun/received_events","type":"User","site_admin":false},"body":"How does the cache works? For how long the results are retained? Can this be added to the docstring?","created_at":"2015-04-28T19:16:17Z","updated_at":"2015-04-28T19:16:17Z","html_url":"https://github.com/inveniosoftware/invenio/pull/3068#discussion_r29278110","pull_request_url":"https://api.github.com/repos/inveniosoftware/invenio/pulls/3068","_links":{"self":{"href":"https://api.github.com/repos/inveniosoftware/invenio/pulls/comments/29278110"},"html":{"href":"https://github.com/inveniosoftware/invenio/pull/3068#discussion_r29278110"},"pull_request":{"href":"https://api.github.com/repos/inveniosoftware/invenio/pulls/3068"}}},"pull_request":{"url":"https://api.github.com/repos/inveniosoftware/invenio/pulls/3068","id":34270026,"html_url":"https://github.com/inveniosoftware/invenio/pull/3068","diff_url":"https://github.com/inveniosoftware/invenio/pull/3068.diff","patch_url":"https://github.com/inveniosoftware/invenio/pull/3068.patch","issue_url":"https://api.github.com/repos/inveniosoftware/invenio/issues/3068","number":3068,"state":"open","locked":false,"title":"search: initial implementation of query enhancers","user":{"login":"jirikuncar","id":189798,"avatar_url":"https://avatars.githubusercontent.com/u/189798?v=3","gravatar_id":"","url":"https://api.github.com/users/jirikuncar","html_url":"https://github.com/jirikuncar","followers_url":"https://api.github.com/users/jirikuncar/followers","following_url":"https://api.github.com/users/jirikuncar/following{/other_user}","gists_url":"https://api.github.com/users/jirikuncar/gists{/gist_id}","starred_url":"https://api.github.com/users/jirikuncar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jirikuncar/subscriptions","organizations_url":"https://api.github.com/users/jirikuncar/orgs","repos_url":"https://api.github.com/users/jirikuncar/repos","events_url":"https://api.github.com/users/jirikuncar/events{/privacy}","received_events_url":"https://api.github.com/users/jirikuncar/received_events","type":"User","site_admin":false},"body":"* Implements a mechanism that enhances users' queries. The enhancer\r\n  functions are specified in the 'SEARCH_QUERY_ENHANCERS' and later they\r\n  are applied to the query AST one after the other in the search method.\r\n  (closes #2987)\r\n\r\nCo-authored-by: Jiri Kuncar <jiri.kuncar@cern.ch>","created_at":"2015-04-28T14:06:48Z","updated_at":"2015-04-28T19:16:17Z","closed_at":null,"merged_at":null,"merge_commit_sha":"41e5c74b51a17b1b3dc38d9d92f474c34c9755a5","assignee":{"login":"tiborsimko","id":517546,"avatar_url":"https://avatars.githubusercontent.com/u/517546?v=3","gravatar_id":"","url":"https://api.github.com/users/tiborsimko","html_url":"https://github.com/tiborsimko","followers_url":"https://api.github.com/users/tiborsimko/followers","following_url":"https://api.github.com/users/tiborsimko/following{/other_user}","gists_url":"https://api.github.com/users/tiborsimko/gists{/gist_id}","starred_url":"https://api.github.com/users/tiborsimko/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tiborsimko/subscriptions","organizations_url":"https://api.github.com/users/tiborsimko/orgs","repos_url":"https://api.github.com/users/tiborsimko/repos","events_url":"https://api.github.com/users/tiborsimko/events{/privacy}","received_events_url":"https://api.github.com/users/tiborsimko/received_events","type":"User","site_admin":false},"milestone":{"url":"https://api.github.com/repos/inveniosoftware/invenio/milestones/13","html_url":"https://github.com/inveniosoftware/invenio/milestones/v2.1","labels_url":"https://api.github.com/repos/inveniosoftware/invenio/milestones/13/labels","id":857114,"number":13,"title":"v2.1","description":"","creator":{"login":"tiborsimko","id":517546,"avatar_url":"https://avatars.githubusercontent.com/u/517546?v=3","gravatar_id":"","url":"https://api.github.com/users/tiborsimko","html_url":"https://github.com/tiborsimko","followers_url":"https://api.github.com/users/tiborsimko/followers","following_url":"https://api.github.com/users/tiborsimko/following{/other_user}","gists_url":"https://api.github.com/users/tiborsimko/gists{/gist_id}","starred_url":"https://api.github.com/users/tiborsimko/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tiborsimko/subscriptions","organizations_url":"https://api.github.com/users/tiborsimko/orgs","repos_url":"https://api.github.com/users/tiborsimko/repos","events_url":"https://api.github.com/users/tiborsimko/events{/privacy}","received_events_url":"https://api.github.com/users/tiborsimko/received_events","type":"User","site_admin":false},"open_issues":28,"closed_issues":119,"state":"open","created_at":"2014-11-07T09:21:23Z","updated_at":"2015-04-28T15:35:03Z","due_on":"2015-04-30T22:00:00Z","closed_at":null},"commits_url":"https://api.github.com/repos/inveniosoftware/invenio/pulls/3068/commits","review_comments_url":"https://api.github.com/repos/inveniosoftware/invenio/pulls/3068/comments","review_comment_url":"https://api.github.com/repos/inveniosoftware/invenio/pulls/comments{/number}","comments_url":"https://api.github.com/repos/inveniosoftware/invenio/issues/3068/comments","statuses_url":"https://api.github.com/repos/inveniosoftware/invenio/statuses/ac3328015a4e47dfd8e3284a516ab61eba166548","head":{"label":"jirikuncar:query-enhancer","ref":"query-enhancer","sha":"ac3328015a4e47dfd8e3284a516ab61eba166548","user":{"login":"jirikuncar","id":189798,"avatar_url":"https://avatars.githubusercontent.com/u/189798?v=3","gravatar_id":"","url":"https://api.github.com/users/jirikuncar","html_url":"https://github.com/jirikuncar","followers_url":"https://api.github.com/users/jirikuncar/followers","following_url":"https://api.github.com/users/jirikuncar/following{/other_user}","gists_url":"https://api.github.com/users/jirikuncar/gists{/gist_id}","starred_url":"https://api.github.com/users/jirikuncar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jirikuncar/subscriptions","organizations_url":"https://api.github.com/users/jirikuncar/orgs","repos_url":"https://api.github.com/users/jirikuncar/repos","events_url":"https://api.github.com/users/jirikuncar/events{/privacy}","received_events_url":"https://api.github.com/users/jirikuncar/received_events","type":"User","site_admin":false},"repo":{"id":16106422,"name":"invenio","full_name":"jirikuncar/invenio","owner":{"login":"jirikuncar","id":189798,"avatar_url":"https://avatars.githubusercontent.com/u/189798?v=3","gravatar_id":"","url":"https://api.github.com/users/jirikuncar","html_url":"https://github.com/jirikuncar","followers_url":"https://api.github.com/users/jirikuncar/followers","following_url":"https://api.github.com/users/jirikuncar/following{/other_user}","gists_url":"https://api.github.com/users/jirikuncar/gists{/gist_id}","starred_url":"https://api.github.com/users/jirikuncar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jirikuncar/subscriptions","organizations_url":"https://api.github.com/users/jirikuncar/orgs","repos_url":"https://api.github.com/users/jirikuncar/repos","events_url":"https://api.github.com/users/jirikuncar/events{/privacy}","received_events_url":"https://api.github.com/users/jirikuncar/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/jirikuncar/invenio","description":"For contribution please check: https://github.com/jirikuncar/invenio/wiki/Contributor-checklist","fork":true,"url":"https://api.github.com/repos/jirikuncar/invenio","forks_url":"https://api.github.com/repos/jirikuncar/invenio/forks","keys_url":"https://api.github.com/repos/jirikuncar/invenio/keys{/key_id}","collaborators_url":"https://api.github.com/repos/jirikuncar/invenio/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/jirikuncar/invenio/teams","hooks_url":"https://api.github.com/repos/jirikuncar/invenio/hooks","issue_events_url":"https://api.github.com/repos/jirikuncar/invenio/issues/events{/number}","events_url":"https://api.github.com/repos/jirikuncar/invenio/events","assignees_url":"https://api.github.com/repos/jirikuncar/invenio/assignees{/user}","branches_url":"https://api.github.com/repos/jirikuncar/invenio/branches{/branch}","tags_url":"https://api.github.com/repos/jirikuncar/invenio/tags","blobs_url":"https://api.github.com/repos/jirikuncar/invenio/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/jirikuncar/invenio/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/jirikuncar/invenio/git/refs{/sha}","trees_url":"https://api.github.com/repos/jirikuncar/invenio/git/trees{/sha}","statuses_url":"https://api.github.com/repos/jirikuncar/invenio/statuses/{sha}","languages_url":"https://api.github.com/repos/jirikuncar/invenio/languages","stargazers_url":"https://api.github.com/repos/jirikuncar/invenio/stargazers","contributors_url":"https://api.github.com/repos/jirikuncar/invenio/contributors","subscribers_url":"https://api.github.com/repos/jirikuncar/invenio/subscribers","subscription_url":"https://api.github.com/repos/jirikuncar/invenio/subscription","commits_url":"https://api.github.com/repos/jirikuncar/invenio/commits{/sha}","git_commits_url":"https://api.github.com/repos/jirikuncar/invenio/git/commits{/sha}","comments_url":"https://api.github.com/repos/jirikuncar/invenio/comments{/number}","issue_comment_url":"https://api.github.com/repos/jirikuncar/invenio/issues/comments{/number}","contents_url":"https://api.github.com/repos/jirikuncar/invenio/contents/{+path}","compare_url":"https://api.github.com/repos/jirikuncar/invenio/compare/{base}...{head}","merges_url":"https://api.github.com/repos/jirikuncar/invenio/merges","archive_url":"https://api.github.com/repos/jirikuncar/invenio/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/jirikuncar/invenio/downloads","issues_url":"https://api.github.com/repos/jirikuncar/invenio/issues{/number}","pulls_url":"https://api.github.com/repos/jirikuncar/invenio/pulls{/number}","milestones_url":"https://api.github.com/repos/jirikuncar/invenio/milestones{/number}","notifications_url":"https://api.github.com/repos/jirikuncar/invenio/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/jirikuncar/invenio/labels{/name}","releases_url":"https://api.github.com/repos/jirikuncar/invenio/releases{/id}","created_at":"2014-01-21T15:23:07Z","updated_at":"2015-03-04T18:43:12Z","pushed_at":"2015-04-28T14:06:16Z","git_url":"git://github.com/jirikuncar/invenio.git","ssh_url":"git@github.com:jirikuncar/invenio.git","clone_url":"https://github.com/jirikuncar/invenio.git","svn_url":"https://github.com/jirikuncar/invenio","homepage":"http://invenio-software.org/","size":89345,"stargazers_count":5,"watchers_count":5,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":5,"mirror_url":null,"open_issues_count":2,"forks":5,"open_issues":2,"watchers":5,"default_branch":"pu"}},"base":{"label":"inveniosoftware:master","ref":"master","sha":"0f488d3d76a8b8ed29f0e273cb6f36f6dd463061","user":{"login":"inveniosoftware","id":1157480,"avatar_url":"https://avatars.githubusercontent.com/u/1157480?v=3","gravatar_id":"","url":"https://api.github.com/users/inveniosoftware","html_url":"https://github.com/inveniosoftware","followers_url":"https://api.github.com/users/inveniosoftware/followers","following_url":"https://api.github.com/users/inveniosoftware/following{/other_user}","gists_url":"https://api.github.com/users/inveniosoftware/gists{/gist_id}","starred_url":"https://api.github.com/users/inveniosoftware/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/inveniosoftware/subscriptions","organizations_url":"https://api.github.com/users/inveniosoftware/orgs","repos_url":"https://api.github.com/users/inveniosoftware/repos","events_url":"https://api.github.com/users/inveniosoftware/events{/privacy}","received_events_url":"https://api.github.com/users/inveniosoftware/received_events","type":"Organization","site_admin":false},"repo":{"id":2665618,"name":"invenio","full_name":"inveniosoftware/invenio","owner":{"login":"inveniosoftware","id":1157480,"avatar_url":"https://avatars.githubusercontent.com/u/1157480?v=3","gravatar_id":"","url":"https://api.github.com/users/inveniosoftware","html_url":"https://github.com/inveniosoftware","followers_url":"https://api.github.com/users/inveniosoftware/followers","following_url":"https://api.github.com/users/inveniosoftware/following{/other_user}","gists_url":"https://api.github.com/users/inveniosoftware/gists{/gist_id}","starred_url":"https://api.github.com/users/inveniosoftware/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/inveniosoftware/subscriptions","organizations_url":"https://api.github.com/users/inveniosoftware/orgs","repos_url":"https://api.github.com/users/inveniosoftware/repos","events_url":"https://api.github.com/users/inveniosoftware/events{/privacy}","received_events_url":"https://api.github.com/users/inveniosoftware/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/inveniosoftware/invenio","description":"Invenio digital library software","fork":false,"url":"https://api.github.com/repos/inveniosoftware/invenio","forks_url":"https://api.github.com/repos/inveniosoftware/invenio/forks","keys_url":"https://api.github.com/repos/inveniosoftware/invenio/keys{/key_id}","collaborators_url":"https://api.github.com/repos/inveniosoftware/invenio/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/inveniosoftware/invenio/teams","hooks_url":"https://api.github.com/repos/inveniosoftware/invenio/hooks","issue_events_url":"https://api.github.com/repos/inveniosoftware/invenio/issues/events{/number}","events_url":"https://api.github.com/repos/inveniosoftware/invenio/events","assignees_url":"https://api.github.com/repos/inveniosoftware/invenio/assignees{/user}","branches_url":"https://api.github.com/repos/inveniosoftware/invenio/branches{/branch}","tags_url":"https://api.github.com/repos/inveniosoftware/invenio/tags","blobs_url":"https://api.github.com/repos/inveniosoftware/invenio/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/inveniosoftware/invenio/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/inveniosoftware/invenio/git/refs{/sha}","trees_url":"https://api.github.com/repos/inveniosoftware/invenio/git/trees{/sha}","statuses_url":"https://api.github.com/repos/inveniosoftware/invenio/statuses/{sha}","languages_url":"https://api.github.com/repos/inveniosoftware/invenio/languages","stargazers_url":"https://api.github.com/repos/inveniosoftware/invenio/stargazers","contributors_url":"https://api.github.com/repos/inveniosoftware/invenio/contributors","subscribers_url":"https://api.github.com/repos/inveniosoftware/invenio/subscribers","subscription_url":"https://api.github.com/repos/inveniosoftware/invenio/subscription","commits_url":"https://api.github.com/repos/inveniosoftware/invenio/commits{/sha}","git_commits_url":"https://api.github.com/repos/inveniosoftware/invenio/git/commits{/sha}","comments_url":"https://api.github.com/repos/inveniosoftware/invenio/comments{/number}","issue_comment_url":"https://api.github.com/repos/inveniosoftware/invenio/issues/comments{/number}","contents_url":"https://api.github.com/repos/inveniosoftware/invenio/contents/{+path}","compare_url":"https://api.github.com/repos/inveniosoftware/invenio/compare/{base}...{head}","merges_url":"https://api.github.com/repos/inveniosoftware/invenio/merges","archive_url":"https://api.github.com/repos/inveniosoftware/invenio/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/inveniosoftware/invenio/downloads","issues_url":"https://api.github.com/repos/inveniosoftware/invenio/issues{/number}","pulls_url":"https://api.github.com/repos/inveniosoftware/invenio/pulls{/number}","milestones_url":"https://api.github.com/repos/inveniosoftware/invenio/milestones{/number}","notifications_url":"https://api.github.com/repos/inveniosoftware/invenio/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/inveniosoftware/invenio/labels{/name}","releases_url":"https://api.github.com/repos/inveniosoftware/invenio/releases{/id}","created_at":"2011-10-28T14:33:51Z","updated_at":"2015-04-28T15:35:00Z","pushed_at":"2015-04-28T16:04:24Z","git_url":"git://github.com/inveniosoftware/invenio.git","ssh_url":"git@github.com:inveniosoftware/invenio.git","clone_url":"https://github.com/inveniosoftware/invenio.git","svn_url":"https://github.com/inveniosoftware/invenio","homepage":"http://invenio-software.org/","size":107799,"stargazers_count":59,"watchers_count":59,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":122,"mirror_url":null,"open_issues_count":774,"forks":122,"open_issues":774,"watchers":59,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/inveniosoftware/invenio/pulls/3068"},"html":{"href":"https://github.com/inveniosoftware/invenio/pull/3068"},"issue":{"href":"https://api.github.com/repos/inveniosoftware/invenio/issues/3068"},"comments":{"href":"https://api.github.com/repos/inveniosoftware/invenio/issues/3068/comments"},"review_comments":{"href":"https://api.github.com/repos/inveniosoftware/invenio/pulls/3068/comments"},"review_comment":{"href":"https://api.github.com/repos/inveniosoftware/invenio/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/inveniosoftware/invenio/pulls/3068/commits"},"statuses":{"href":"https://api.github.com/repos/inveniosoftware/invenio/statuses/ac3328015a4e47dfd8e3284a516ab61eba166548"}}}}