When creating Dockerfiles using the Alpine image, I have often seen the use of the apk --no-cache and other times it is committed and instead I see rm /var/ca
I think this is a design style. The essence of cache is to reuse, for example, multiple containers can mount the same cached file system without repeatedly downloading it from the network.
Can view the apline wiki: https://wiki.alpinelinux.org/wiki/Alpine_Linux_package_management#Local_Cache