react-version #1
@ -38,7 +38,7 @@ public class ImageController : ControllerBase {
|
||||
string path, filename, filetype;
|
||||
IQueryable<ProductModel> query;
|
||||
|
||||
if (_cache is not null)
|
||||
if (_cache is not null && _cache.isOk())
|
||||
query = _cache.queryCache();
|
||||
else query = _context.Products;
|
||||
|
||||
|
@ -116,7 +116,7 @@ public class DatabaseCacheService {
|
||||
}
|
||||
return copy;
|
||||
}
|
||||
public IQueryable<ProductModel> queryCache() {
|
||||
public IQueryable<ProductModel>? queryCache() {
|
||||
if (!_ok)
|
||||
return null;
|
||||
try {
|
||||
|
Loading…
Reference in New Issue
Block a user