mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-06-30 11:22:53 +01:00
made some improvements to the base http handler
This commit is contained in:
parent
19e202d5e1
commit
d8c01ded6e
@@ -17,7 +17,7 @@ namespace MediaBrowser.Api.HttpHandlers
|
||||
{
|
||||
return ApiService.IsApiUrlMatch("pluginconfiguration", request);
|
||||
}
|
||||
|
||||
|
||||
private BasePlugin _plugin;
|
||||
private BasePlugin Plugin
|
||||
{
|
||||
@@ -39,18 +39,15 @@ namespace MediaBrowser.Api.HttpHandlers
|
||||
return Task.FromResult(Plugin.Configuration);
|
||||
}
|
||||
|
||||
public override TimeSpan CacheDuration
|
||||
protected override async Task<ResponseInfo> GetResponseInfo()
|
||||
{
|
||||
get
|
||||
{
|
||||
return TimeSpan.FromDays(7);
|
||||
}
|
||||
}
|
||||
var info = await base.GetResponseInfo().ConfigureAwait(false);
|
||||
|
||||
protected override Task<DateTime?> GetLastDateModified()
|
||||
{
|
||||
return Task.FromResult<DateTime?>(Plugin.ConfigurationDateLastModified);
|
||||
}
|
||||
info.DateLastModified = Plugin.ConfigurationDateLastModified;
|
||||
|
||||
info.CacheDuration = TimeSpan.FromDays(7);
|
||||
|
||||
return info;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user