{"id":26422446,"url":"https://github.com/chr5tphr/funcache","last_synced_at":"2026-04-21T05:32:25.913Z","repository":{"id":104837285,"uuid":"209550716","full_name":"chr5tphr/funcache","owner":"chr5tphr","description":"Minimally cache python function outputs on disk!","archived":false,"fork":false,"pushed_at":"2019-10-15T11:23:35.000Z","size":5,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-08-10T04:34:56.805Z","etag":null,"topics":["cache","disk","functions","hash","memoization","metrohash","numpy","python","pytorch"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/chr5tphr.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2019-09-19T12:40:37.000Z","updated_at":"2023-04-10T10:46:20.000Z","dependencies_parsed_at":null,"dependency_job_id":"acc75497-6350-4a29-87eb-6ff070c5a886","html_url":"https://github.com/chr5tphr/funcache","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/chr5tphr/funcache","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chr5tphr%2Ffuncache","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chr5tphr%2Ffuncache/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chr5tphr%2Ffuncache/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chr5tphr%2Ffuncache/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/chr5tphr","download_url":"https://codeload.github.com/chr5tphr/funcache/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chr5tphr%2Ffuncache/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32078810,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-21T02:38:07.213Z","status":"ssl_error","status_checked_at":"2026-04-21T02:38:06.559Z","response_time":128,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cache","disk","functions","hash","memoization","metrohash","numpy","python","pytorch"],"created_at":"2025-03-18T02:04:19.242Z","updated_at":"2026-04-21T05:32:25.908Z","avatar_url":"https://github.com/chr5tphr.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Funcache\nCaching function outputs by hashing inputs using MetroHash.\n\n## Example\n```python\nfrom timeit import timeit\nfrom shutil import rmtree\n\nimport numpy as np\nfrom funcache import cache\n\ncache_path = '/tmp/__democache__'\n\n# default path to store cache can be set like the following:\n@cache(cache_path)\ndef linear(data, weight, bias):\n    return data @ weight + bias\n\nfor size in [1024, 2048, 4096, 8192]:\n    data = np.zeros((size, size))\n    weight = np.zeros((size, size))\n    bias = np.zeros((size,))\n\n    # the original, uncached function can be accessed as linear.__wrapped__\n    dtime_u = timeit(\n        lambda: linear.__wrapped__(data, weight, bias),\n        number=1\n    )\n\n    # caching path can also be set using the keyword argument '_cache',\n    # and disabled by setting it to None\n    dtime_1 = timeit(\n        lambda: linear(data, weight, bias, _cache=cache_path),\n        number=1\n    )\n\n    dtime_2 = timeit(lambda: linear(data, weight, bias), number=1)\n\n    print(\"Size: {}\".format(size))\n    print(\"    Uncached: {:.3f}s\".format(dtime_u))\n    print(\"    Cached 1: {:.3f}s\".format(dtime_1))\n    print(\"    Cached 2: {:.3f}s\".format(dtime_2))\n\nrmtree(cache_path)\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchr5tphr%2Ffuncache","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fchr5tphr%2Ffuncache","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchr5tphr%2Ffuncache/lists"}