- Updated variable expansions to use double quotes for better safety and to prevent word splitting.
- Replaced `ls` with `find` in cache operations to handle non-alphanumeric filenames more robustly.
- Enhanced array handling in scripts by using `${*:N}` syntax for concatenation.
- Improved readability and consistency in conditional checks by using `[[ ... ]]` instead of `[ ... ]`.
- Added comments for clarity on specific operations and shellcheck directives.