1
1
mirror of https://github.com/systemd/systemd-stable.git synced 2025-01-26 10:03:40 +03:00

zsh: remove unit property caching

The existing caching policy isn't very sensible for this cache. We could
write a different policy, but I don't think there is much value in
caching these values, as in my experience the command used to generate
them is quick.
This commit is contained in:
Ronan Pigott 2023-07-18 16:52:18 -07:00
parent 110ba0ccf9
commit ae6fb82cd9

View File

@ -451,13 +451,9 @@ done
(( $+functions[_systemctl_unit_properties] )) || (( $+functions[_systemctl_unit_properties] )) ||
_systemctl_unit_properties() { _systemctl_unit_properties() {
if ( [[ ${+_sys_all_properties} -eq 0 ]] || _cache_invalid SYS_ALL_PROPERTIES$_sys_service_mgr ) || local -a _sys_all_properties=( ${(f)"$({{ROOTLIBEXECDIR}}/systemd --no-pager --dump-bus-properties 2>/dev/null)"} )
! _retrieve_cache SYS_ALL_PROPERTIES$_sys_service_mgr; _wanted systemd-unit-properties expl 'unit property' \
then _values -s , "${_sys_all_properties[@]}"
_sys_all_properties=( ${${(M)${(f)"$({{ROOTLIBEXECDIR}}/systemd --dump-bus-properties)"}}} )
_store_cache SYS_ALL_PROPERTIES$_sys_service_mgr _sys_all_properties
fi
_values -s , "${_sys_all_properties[@]}"
} }
(( $+functions[_systemctl_job_modes] )) || (( $+functions[_systemctl_job_modes] )) ||