{"html_url": "https://github.com/simonw/sqlite-utils/issues/350#issuecomment-987016019", "issue_url": "https://api.github.com/repos/simonw/sqlite-utils/issues/350", "id": 987016019, "node_id": "IC_kwDOCGYnMM461KtT", "user": {"value": 9599, "label": "simonw"}, "created_at": "2021-12-06T17:56:57Z", "updated_at": "2021-12-06T17:56:57Z", "author_association": "OWNER", "body": "Would be interesting to micro-benchmark this to get an idea for how much of a performance boost it is, since the indexed SQLite lookups used by `table.lookup()` should be really fast already.", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 1072435124, "label": "Optional caching mechanism for table.lookup()"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/sqlite-utils/issues/350#issuecomment-987015327", "issue_url": "https://api.github.com/repos/simonw/sqlite-utils/issues/350", "id": 987015327, "node_id": "IC_kwDOCGYnMM461Kif", "user": {"value": 9599, "label": "simonw"}, "created_at": "2021-12-06T17:56:05Z", "updated_at": "2021-12-06T17:56:05Z", "author_association": "OWNER", "body": "Should I implement this remember to apply the optimization in `git-history`.", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 1072435124, "label": "Optional caching mechanism for table.lookup()"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/sqlite-utils/issues/350#issuecomment-987015063", "issue_url": "https://api.github.com/repos/simonw/sqlite-utils/issues/350", "id": 987015063, "node_id": "IC_kwDOCGYnMM461KeX", "user": {"value": 9599, "label": "simonw"}, "created_at": "2021-12-06T17:55:42Z", "updated_at": "2021-12-06T17:55:42Z", "author_association": "OWNER", "body": "API could be this:\r\n```python\r\nid = db[\"columns\"].lookup(\r\n {\"namespace\": namespace_id, \"name\": column},\r\n cache=True\r\n)\r\n```\r\nThis could default to a 100 item LRU cache. You could perhaps modify that with `cache_size=500` or with `cache_size=None` to disable the size limit on that cache.", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 1072435124, "label": "Optional caching mechanism for table.lookup()"}, "performed_via_github_app": null}