Fix comparison used to determine if the cache is outdated.
use ls instead of find to avoid incompatibility with gnu find