Browse Source

Update DocumentAppService.cs

pull/6400/head
Yunus Emre Kalkan 6 years ago
parent
commit
6e9b9e4521
  1. 5
      modules/docs/src/Volo.Docs.Application/Volo/Docs/Documents/DocumentAppService.cs

5
modules/docs/src/Volo.Docs.Application/Volo/Docs/Documents/DocumentAppService.cs

@ -247,10 +247,7 @@ namespace Volo.Docs.Documents
return await GetDocumentAsync(documentName, project, languageCode, version); return await GetDocumentAsync(documentName, project, languageCode, version);
} }
//Only the latest version (dev) of the document needs to update the cache. if (document.LastCachedTime + _cacheTimeout < DateTime.Now)
if (!project.LatestVersionBranchName.IsNullOrWhiteSpace() &&
document.Version == project.LatestVersionBranchName &&
document.LastCachedTime + _cacheTimeout < DateTime.Now)
{ {
return await GetDocumentAsync(documentName, project, languageCode, version, document); return await GetDocumentAsync(documentName, project, languageCode, version, document);
} }

Loading…
Cancel
Save