fixing freshness check in db_cache