mirror of
https://github.com/anjoy8/Blog.Core.git
synced 2024-09-20 23:48:27 +08:00
add action cache 🎨
This commit is contained in:
parent
fd2c58eee2
commit
9c5058b84c
|
@ -48,6 +48,8 @@ namespace Blog.Core.Controllers
|
|||
/// <returns></returns>
|
||||
[HttpGet]
|
||||
[AllowAnonymous]
|
||||
//[ResponseCache(Location = ResponseCacheLocation.None, NoStore = true)]
|
||||
[ResponseCache(Duration = 600)]
|
||||
public async Task<object> Get(int id, int page = 1, string bcategory = "技术博文", string key = "")
|
||||
{
|
||||
int intTotalCount = 6;
|
||||
|
|
|
@ -267,6 +267,7 @@ namespace Blog.Core.Controllers
|
|||
/// <param name="uid"></param>
|
||||
/// <returns></returns>
|
||||
[HttpGet]
|
||||
[ResponseCache(Duration = 3600)]
|
||||
public async Task<MessageModel<NavigationBar>> GetNavigationBar(int uid)
|
||||
{
|
||||
|
||||
|
|
|
@ -35,6 +35,7 @@ namespace Blog.Core.Controllers
|
|||
/// <returns></returns>
|
||||
// GET: api/User
|
||||
[HttpGet]
|
||||
[ResponseCache(Duration = 3600)]
|
||||
public async Task<MessageModel<PageModel<Role>>> Get(int page = 1, string key = "")
|
||||
{
|
||||
if (string.IsNullOrEmpty(key) || string.IsNullOrWhiteSpace(key))
|
||||
|
|
|
@ -48,6 +48,7 @@ namespace Blog.Core.Controllers
|
|||
/// <returns></returns>
|
||||
// GET: api/User
|
||||
[HttpGet]
|
||||
[ResponseCache(Duration = 3600)]
|
||||
public async Task<MessageModel<PageModel<sysUserInfo>>> Get(int page = 1, string key = "")
|
||||
{
|
||||
if (string.IsNullOrEmpty(key) || string.IsNullOrWhiteSpace(key))
|
||||
|
|
Loading…
Reference in New Issue
Block a user