CACHE
This commit is contained in:
@@ -86,6 +86,9 @@ public class SearchController : Controller {
|
||||
|
||||
query = query.Trim();
|
||||
|
||||
if (_searchCache is null)
|
||||
return products;
|
||||
|
||||
try { // Pour faire une liste priorisée.
|
||||
if (preview.HasValue && preview == true)
|
||||
products = _searchCache.Where(x => x.Title.Contains(query)).Take(PREVIEW).ToList();
|
||||
|
Reference in New Issue
Block a user