mirror of
https://github.com/JanDeDobbeleer/oh-my-posh.git
synced 2025-02-02 05:41:10 -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 {
|
func (k *Kubectl) Enabled() bool {
|
||||||
cacheTimeout := k.props.GetInt(properties.CacheTimeout, 1)
|
cacheTimeout := k.props.GetInt(properties.CacheTimeout, 0)
|
||||||
|
|
||||||
if cacheTimeout > 0 {
|
if cacheTimeout > 0 {
|
||||||
if err := k.restoreCacheValue(); err == nil {
|
if err := k.restoreCacheValue(); err == nil {
|
||||||
|
|
|
@ -8,10 +8,6 @@ sidebar_label: Kubernetes
|
||||||
|
|
||||||
Display the currently active Kubernetes context name and namespace name.
|
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
|
## Sample Configuration
|
||||||
|
|
||||||
import Config from "@site/src/components/Config.js";
|
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 |
|
| `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 |
|
| `parse_kubeconfig` | `boolean` | `false` | parse kubeconfig files instead of calling out to kubectl to improve performance |
|
||||||
| `context_aliases` | `object` | | custom context namespace |
|
| `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])
|
## Template ([info][templates])
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue