mirror of
https://github.com/tw93/Mole.git
synced 2026-02-04 19:44:44 +00:00
feat: Boost UI performance with pure bash string width calculation and truncation, and add visual feedback for cache hits in uninstall scripts.
This commit is contained in:
@@ -83,6 +83,12 @@ scan_applications() {
|
||||
[[ $cache_age -eq $(date +%s) ]] && cache_age=86401 # Handle missing file
|
||||
if [[ $cache_age -lt $cache_ttl ]]; then
|
||||
# Cache hit - return immediately
|
||||
# Show brief flash of cache usage if in interactive mode
|
||||
if [[ -t 2 ]]; then
|
||||
echo -e "${GREEN}Loading from cache...${NC}" >&2
|
||||
# Small sleep to let user see it (optional, but good for "feeling" the speed vs glitch)
|
||||
sleep 0.3
|
||||
fi
|
||||
echo "$cache_file"
|
||||
return 0
|
||||
fi
|
||||
|
||||
Reference in New Issue
Block a user