Add filecache to git plugin FileContent with configurable TTL by Lagoja · Pull Request #2798 · jetify-com/devbox
The git plugin's FileContent method was cloning the repo on every call. This adds caching using filecache (matching the github plugin pattern), with TTL controlled by DEVBOX_X_GITHUB_PLUGIN_CACHE_TTL env var. Includes tests for cache hit, TTL expiry, and invalid TTL handling.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Signed-off-by: John Lago <750845+Lagoja@users.noreply.github.com>
Use ttl.String() instead of raw env var in cache keys to avoid path-separator injection and trailing slashes. Add t.Skip guard in setupLocalGitRepo for CI environments without git. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Lagoja
deleted the
jl/github-cache-backoff-env-variable-not-working-for-githttps
branch
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters