mirror of
https://github.com/JanDeDobbeleer/oh-my-posh.git
synced 2024-11-09 20:44:03 -08:00
fix(kubectl): change cache to 0 by default
This commit is contained in:
parent
69f6982e2c
commit
a6461d2d79
|
@ -76,7 +76,7 @@ func (k *Kubectl) restoreCacheValue() error {
|
|||
}
|
||||
|
||||
func (k *Kubectl) Enabled() bool {
|
||||
cacheTimeout := k.props.GetInt(properties.CacheTimeout, 1)
|
||||
cacheTimeout := k.props.GetInt(properties.CacheTimeout, 0)
|
||||
|
||||
if cacheTimeout > 0 {
|
||||
if err := k.restoreCacheValue(); err == nil {
|
||||
|
|
|
@ -8,10 +8,6 @@ sidebar_label: Kubernetes
|
|||
|
||||
Display the currently active Kubernetes context name and namespace name.
|
||||
|
||||
:::caution
|
||||
The Kubernetes context is cached for 1 minute by default. To avoid caching, set `cache_timeout` to 0.
|
||||
:::
|
||||
|
||||
## Sample Configuration
|
||||
|
||||
import Config from "@site/src/components/Config.js";
|
||||
|
@ -39,7 +35,7 @@ import Config from "@site/src/components/Config.js";
|
|||
| `display_error` | `boolean` | `false` | show the error context when failing to retrieve the kubectl information |
|
||||
| `parse_kubeconfig` | `boolean` | `false` | parse kubeconfig files instead of calling out to kubectl to improve performance |
|
||||
| `context_aliases` | `object` | | custom context namespace |
|
||||
| `cache_timeout` | `int` | `1` | in minutes - how long is the context cached |
|
||||
| `cache_timeout` | `int` | `0` | in minutes - how long is the context cached |
|
||||
|
||||
## Template ([info][templates])
|
||||
|
||||
|
|
Loading…
Reference in a new issue