Skip to content

Commit 5ae9343

Browse files
authored
Merge pull request #8079 from NuGet/dev
[ReleasePrep][2020.06.30]RI of dev into master
2 parents 84ea589 + 7f45d88 commit 5ae9343

29 files changed

Lines changed: 349 additions & 55 deletions

src/Bootstrap/dist/css/bootstrap-theme.css

Lines changed: 0 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/Bootstrap/less/theme/base.less

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -230,11 +230,6 @@ body {
230230
&.banner-info {
231231
background: @info-bg;
232232
}
233-
234-
&.banner-blm {
235-
background-color: #000;
236-
color: #fff;
237-
}
238233
}
239234

240235
.alert {

src/Bootstrap/package-lock.json

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/GitHubVulnerabilities2Db/Gallery/ThrowingTelemetryService.cs

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -236,6 +236,11 @@ public void TrackPackageOwnershipAutomaticallyAdded(string packageId, string pac
236236
throw new NotImplementedException();
237237
}
238238

239+
public void TrackPackagePushDisconnectEvent()
240+
{
241+
throw new NotImplementedException();
242+
}
243+
239244
public void TrackPackagePushEvent(Package package, User user, IIdentity identity)
240245
{
241246
throw new NotImplementedException();
@@ -316,6 +321,11 @@ public void TrackSymbolPackageFailedGalleryValidationEvent(string packageId, str
316321
throw new NotImplementedException();
317322
}
318323

324+
public void TrackSymbolPackagePushDisconnectEvent()
325+
{
326+
throw new NotImplementedException();
327+
}
328+
319329
public void TrackSymbolPackagePushEvent(string packageId, string packageVersion)
320330
{
321331
throw new NotImplementedException();
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
// Copyright (c) .NET Foundation. All rights reserved.
2+
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
3+
4+
namespace NuGetGallery.Services
5+
{
6+
public class CacheConfiguration : ICacheConfiguration
7+
{
8+
public const int DefaultPackageDependentsCacheTimeInSeconds = 3600;
9+
10+
public int PackageDependentsCacheTimeInSeconds { get; set; } = DefaultPackageDependentsCacheTimeInSeconds;
11+
}
12+
}
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
// Copyright (c) .NET Foundation. All rights reserved.
2+
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
3+
4+
namespace NuGetGallery.Services
5+
{
6+
public interface ICacheConfiguration
7+
{
8+
/// <summary>
9+
/// The cache duration for the dependent packages in the package details page
10+
/// </summary>
11+
int PackageDependentsCacheTimeInSeconds { get; }
12+
}
13+
}

src/NuGetGallery.Services/NuGetGallery.Services.csproj

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,12 +102,14 @@
102102
<Compile Include="Authentication\V3Hasher.cs" />
103103
<Compile Include="Configuration\ABTestConfiguration.cs" />
104104
<Compile Include="Configuration\AppConfiguration.cs" />
105+
<Compile Include="Configuration\CacheConfiguration.cs" />
105106
<Compile Include="Configuration\CertificatesConfiguration.cs" />
106107
<Compile Include="Configuration\ConfigurationService.cs" />
107108
<Compile Include="Configuration\FeatureConfiguration.cs" />
108109
<Compile Include="Configuration\FeatureFlagService.cs" />
109110
<Compile Include="Configuration\IABTestConfiguration.cs" />
110111
<Compile Include="Configuration\IAppConfiguration.cs" />
112+
<Compile Include="Configuration\ICacheConfiguration.cs" />
111113
<Compile Include="Configuration\ICertificatesConfiguration.cs" />
112114
<Compile Include="Configuration\IFeatureFlagService.cs" />
113115
<Compile Include="Configuration\IGalleryConfigurationService.cs" />

src/NuGetGallery.Services/ServicesConstants.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@ public static class ContentNames
5555
public static readonly string NuGetPackagesGitHubDependencies = "GitHubUsage.v1";
5656
public static readonly string ABTestConfiguration = "AB-Test-Configuration";
5757
public static readonly string ODataCacheConfiguration = "OData-Cache-Configuration";
58+
public static readonly string CacheConfiguration = "Cache-Configuration";
5859
}
5960
}
6061
}

src/NuGetGallery.Services/Storage/ContentObjectService.cs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ public ContentObjectService(IContentService contentService)
2626
GitHubUsageConfiguration = new GitHubUsageConfiguration(Array.Empty<RepositoryInformation>());
2727
ABTestConfiguration = new ABTestConfiguration();
2828
ODataCacheConfiguration = new ODataCacheConfiguration();
29+
CacheConfiguration = new CacheConfiguration();
2930
}
3031

3132
public ILoginDiscontinuationConfiguration LoginDiscontinuationConfiguration { get; private set; }
@@ -35,6 +36,7 @@ public ContentObjectService(IContentService contentService)
3536
public IGitHubUsageConfiguration GitHubUsageConfiguration { get; private set; }
3637
public IABTestConfiguration ABTestConfiguration { get; private set; }
3738
public IODataCacheConfiguration ODataCacheConfiguration { get; private set; }
39+
public ICacheConfiguration CacheConfiguration { get; private set; }
3840

3941
public async Task Refresh()
4042
{
@@ -66,6 +68,10 @@ await Refresh<ABTestConfiguration>(ServicesConstants.ContentNames.ABTestConfigur
6668
ODataCacheConfiguration =
6769
await Refresh<ODataCacheConfiguration>(ServicesConstants.ContentNames.ODataCacheConfiguration) ??
6870
new ODataCacheConfiguration();
71+
72+
CacheConfiguration =
73+
await Refresh<CacheConfiguration>(ServicesConstants.ContentNames.CacheConfiguration) ??
74+
new CacheConfiguration();
6975
}
7076

7177
private async Task<T> Refresh<T>(string contentName)

src/NuGetGallery.Services/Storage/IContentObjectService.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ public interface IContentObjectService
1515
IGitHubUsageConfiguration GitHubUsageConfiguration { get; }
1616
IABTestConfiguration ABTestConfiguration { get; }
1717
IODataCacheConfiguration ODataCacheConfiguration { get; }
18+
ICacheConfiguration CacheConfiguration { get; }
1819

1920
Task Refresh();
2021
}

0 commit comments

Comments
 (0)