fix counting cachedDoc size and fetchedDocs
tests updated