{"id":13815651,"url":"https://github.com/QuarticCat/zsh-smartcache","last_synced_at":"2025-05-15T09:32:56.182Z","repository":{"id":131301637,"uuid":"502020623","full_name":"QuarticCat/zsh-smartcache","owner":"QuarticCat","description":"A Zsh plugin to cache command output to boost shell startup.","archived":false,"fork":false,"pushed_at":"2024-04-30T18:58:16.000Z","size":12,"stargazers_count":26,"open_issues_count":0,"forks_count":2,"subscribers_count":3,"default_branch":"main","last_synced_at":"2024-05-21T13:49:14.019Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/QuarticCat.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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}},"created_at":"2022-06-10T11:39:28.000Z","updated_at":"2024-06-17T14:02:29.139Z","dependencies_parsed_at":"2024-03-15T12:29:29.113Z","dependency_job_id":"1ad449d9-34c2-43f4-8cfc-7d63a6192a71","html_url":"https://github.com/QuarticCat/zsh-smartcache","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/QuarticCat%2Fzsh-smartcache","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/QuarticCat%2Fzsh-smartcache/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/QuarticCat%2Fzsh-smartcache/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/QuarticCat%2Fzsh-smartcache/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/QuarticCat","download_url":"https://codeload.github.com/QuarticCat/zsh-smartcache/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254313988,"owners_count":22050151,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":[],"created_at":"2024-08-04T04:03:49.390Z","updated_at":"2025-05-15T09:32:56.175Z","avatar_url":"https://github.com/QuarticCat.png","language":"Shell","funding_links":[],"categories":["Plugins","Shell"],"sub_categories":["ZSH on Windows"],"readme":"# zsh-smartcache\n\nA Zsh plugin to cache command output to boost shell startup.\n\n## What it does\n\nIt basically has the same functionality as [evalcache](https://github.com/mroth/evalcache), except that\n\n- It will automatically update the cache and inform you, while evalcache will never update the cache until you clear them. This operation is done in the background, so it has no effect on the satrtup time.\n- It also supports caching completions. (experimental)\n\n## Benchmark\n\nHere are some benchmark results. (CPU: Ryzen 3700X)\n\nBenchmarked by `hyperfine 'zsh -ic exit'` and comparing the differences.\n\n| command | version | raw eval | zsh-smartcache | evalcache |\n| :-----: | :-----: | -------: | -------------: | --------: |\n| `rbenv init` | 1.2.0 | ~48ms | ~23.5ms | ~23.5ms |\n| `hub alias` | 2.14.2 | ~2.5ms | ~1.5ms | ~1.5ms |\n| `scmpuff init` | 0.5.0 | ~2.5ms | ~2ms | ~2ms |\n\nSome changes from evalcache's results:\n\n- Only the subsequent runs are recorded. The first run has a fixed extra cost (~1ms).\n- Speedup of `rbenv init` is much lower, since the command output now includes `rbenv` calls, which are super slow.\n- `hub alias` and `scmpuff init` are superfast now.\n\n## Usage\n\n### Eval\n\n```zsh\neval \"$(rbenv init -)\"\n# change to\nsmartcache eval rbenv init -\n```\n\n### Completion\n\n```zsh\nrustup completions zsh \u003e ~/.zfunc/_rustup\nfpath+=~/.zfunc\n# change to\nsmartcache comp rustup completions zsh\n```\n\n## Configuration\n\n- `ZSH_SMARTCACHE_DIR`: cache files storage, default to `${XDG_CACHE_HOME:-$HOME/.cache}/zsh-smartcache`.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FQuarticCat%2Fzsh-smartcache","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FQuarticCat%2Fzsh-smartcache","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FQuarticCat%2Fzsh-smartcache/lists"}