Surface cache controls in CLI and defaults #21
Labels
No labels
bug
duplicate
enhancement
help wanted
invalid
question
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Blocks
Reference
glenux/docmachine-cli#21
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
title: Surface cache controls in CLI and defaults
description: Provide explicit CLI options/docs for cache usage and ensure sensible defaults, since users report cache never used (likely because
enable_cachedefaults to false and isn't exposed in CLI).current_situation:
DocMachine::Build::Configsetsenable_cachedefault true in code but CLI never exposes a flag to disable/enable; users cannot tell whether caching is active._pull_imagelogic effectively disables cache reuse (see task a95c1b2), but even with fixes we need explicit commands/flags to control behaviour.--helplacks information on caching directories, environment overrides, or how to refresh the cache.expected_outcome:
--cache/--no-cache) clearly toggles caching; help text documentsXDG_CACHE_HOMEusage.technical_details:
DocMachine::Build::Cliand wire them toconfig.enable_cacheor future cache policies.d6a41fc Surface cache controls in CLI and defaultsto Surface cache controls in CLI and defaultsEn investiguant le code actuel, la raison principale du « cache jamais utilise » est que
enable_cacheest desactive par defaut et n'est pas activable via la CLI.src/build/config.cr:property enable_cache : Bool = falsesrc/build/cli.cr: seule option--no-cachequi forcefalse(pas de--cache/--enable-cache).src/build/run.cr#_pull_image: quandcache_enabled=false=>docker pullsystematique.A noter: la section
current_situationde ce ticket mentionne un defauttrue, mais dans HEAD (8da1820) c'estfalse. => a mettre a jour dans le ticket ou ajuster l'implementation selon la decision UX (defaut true vs flag explicite).image.targlobal) #28docker run --pull=never) #29docker run --pull=never)image.targlobal)Correction implementee localement (non-pushee):
src/build/config.cr:enable_cachepasse atruepar defaut.src/build/cli.cr: ajout du flag--cache+ maintien de--no-cache.README.md: doc rapide sur l'emplacement du cache (XDG) + commande--no-cache.spec/build/cli_spec.cr: test pour verifier quedocmachine build --helpexpose bien--cacheet--no-cache.crystal spec --error-traceOK (23 examples).