using cache for doc