Cache checking function

Building on the cache checking function, still need to improve how the
script checks differences between two timestamps.