optimize assembly list retrieval
This commit is contained in:
parent
23ae4b01cb
commit
5302be8bc1
|
@ -19,8 +19,6 @@ using System.Net.Http.Headers;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
using Microsoft.Extensions.Logging;
|
using Microsoft.Extensions.Logging;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Diagnostics;
|
|
||||||
using static System.Net.WebRequestMethods;
|
|
||||||
|
|
||||||
namespace Oqtane.Controllers
|
namespace Oqtane.Controllers
|
||||||
{
|
{
|
||||||
|
@ -104,8 +102,11 @@ namespace Oqtane.Controllers
|
||||||
// GET api/<controller>/list
|
// GET api/<controller>/list
|
||||||
[HttpGet("list")]
|
[HttpGet("list")]
|
||||||
public List<string> List()
|
public List<string> List()
|
||||||
|
{
|
||||||
|
return _cache.GetOrCreate("assemblieslist", entry =>
|
||||||
{
|
{
|
||||||
return GetAssemblyList();
|
return GetAssemblyList();
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
// GET api/<controller>/load?list=x,y
|
// GET api/<controller>/load?list=x,y
|
||||||
|
|
|
@ -12,7 +12,6 @@ using Oqtane.Shared;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Diagnostics;
|
using System.Diagnostics;
|
||||||
using System.Globalization;
|
using System.Globalization;
|
||||||
using System;
|
|
||||||
|
|
||||||
namespace Oqtane.Controllers
|
namespace Oqtane.Controllers
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue
Block a user