update cache method