add log and cache