-
-
Notifications
You must be signed in to change notification settings - Fork 587
Open
Description
While investigating some performance issues, we noticed that the call to SiteService.GetAllAsync does not cache the result at all. The rest of methods that get data from SiteService (ex. GetByIdAsync) use the cache for the results.
Is there any reason why SiteService.GetAllAsync does not use cache? Or is it an oversight?
public async Task<IEnumerable> GetAllAsync()
{
var models = await _repo.GetAll();
if (models.Count() > 0)
{
foreach (var model in models)
{
if (model.Logo != null && model.Logo.Id.HasValue)
{
await _factory.InitFieldAsync(model.Logo);
}
}
}
return models;
}