Started working on output caching api results

This commit is contained in:
2025-01-26 15:06:06 +01:00
parent 2dd3f7f5be
commit 97805795b7
9 changed files with 32 additions and 9 deletions

View File

@@ -1,9 +1,10 @@
using Microsoft.AspNetCore.Mvc;
using Microsoft.AspNetCore.OutputCaching;
using Portfolio.Shared.Services;
namespace Portfolio.Api.Controller;
[ApiController, Route("api/projects")]
[ApiController, Route("api/projects"), OutputCache(Tags = [DatabaseContext.CacheKey])]
public class ProjectController(IProjectRepository repository) : ControllerBase {
[HttpGet]