handle both old and new hexdigest formats in cached_get