Skip to content

HasCacheOption

github-actions edited this page Apr 23, 2026 · 1 revision

Provides the standard cache option used by cache-writing commands.


  • Full name: \FastForward\DevTools\Console\Input\HasCacheOption

Methods

addCacheOption

Adds the standard cache control option to the current command.

protected addCacheOption(string $description): static

Parameters:

Parameter Type Description
$description string the cache option description

addCacheDirOption

Adds the standard cache directory option to the current command.

protected addCacheDirOption(string $description, string $default): static

Parameters:

Parameter Type Description
$description string the cache directory option description
$default string the command-specific default cache directory

isCacheEnabled

Resolves whether cache writes SHOULD be enabled for the current invocation.

protected isCacheEnabled(\Symfony\Component\Console\Input\InputInterface $input, bool $default = true): bool

Parameters:

Parameter Type Description
$input \Symfony\Component\Console\Input\InputInterface the current command input
$default bool the command-specific default cache behavior when the option is omitted

resolveCacheArgument

Returns the explicit cache flag that SHOULD be forwarded to nested commands.

protected resolveCacheArgument(\Symfony\Component\Console\Input\InputInterface $input): ?string

Parameters:

Parameter Type Description
$input \Symfony\Component\Console\Input\InputInterface the current command input

resolveCacheDirArgument

Resolves a nested cache directory for a child command.

protected resolveCacheDirArgument(\Symfony\Component\Console\Input\InputInterface $input, string $path = ''): ?string

Parameters:

Parameter Type Description
$input \Symfony\Component\Console\Input\InputInterface the current command input
$path string the child cache path relative to the current command cache root

Clone this wiki locally