You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: 10/umbraco-cms/reference/cache/examples/tags.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -18,7 +18,7 @@ For this example we're working with tags. On my site I have two tag properties:
18
18
19
19
We're going to expose an endpoint that allows us to get the tags from each group.
20
20
21
-
The tags from the `default` should be cached for a minute and the`blog` tags will be cached until site restart or if you publish a blog post node in the Backoffice.
21
+
The tags from the `default` should be cached for a minute. The`blog` tags will be cached until site restart or if you publish a blog post node in the Backoffice.
Copy file name to clipboardExpand all lines: 13/umbraco-cms/reference/cache/examples/tags.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -16,7 +16,7 @@ For this example we're working with tags. On my site I have two tag properties:
16
16
17
17
We're going to expose an endpoint that allows us to get the tags from each group.
18
18
19
-
The tags from the `default` should be cached for a minute and the`blog` tags will be cached until site restart or if you publish a blog post node in the Backoffice.
19
+
The tags from the `default` should be cached for a minute. The`blog` tags will be cached until site restart or if you publish a blog post node in the Backoffice.
Copy file name to clipboardExpand all lines: 14/umbraco-cms/reference/cache/examples/tags.md
+6-10Lines changed: 6 additions & 10 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -16,7 +16,7 @@ For this example we're working with tags. On my site I have two tag properties:
16
16
17
17
We're going to expose an endpoint that allows us to get the tags from each group.
18
18
19
-
The tags from the `default` should be cached for a minute and the`blog` tags will be cached until site restart or if you publish a blog post node in the Backoffice.
19
+
The tags from the `default` should be cached for a minute. The`blog` tags will be cached until site restart or if you publish a blog post node in the Backoffice.
20
20
21
21
## Example
22
22
@@ -108,22 +108,18 @@ Now you can inject `ICacheTagService` in any constructor in your project - wohoo
108
108
109
109
Now that we have our service it's time to create an endpoint where we can fetch the (cached) tags.
110
110
111
-
{% hint style="warning" %}
112
-
The example below uses UmbracoApiController which is obsolete in Umbraco 14 and will be removed in Umbraco 15.
113
-
{% endhint %}
114
-
115
111
```csharp
116
112
usingSystem;
117
113
usingSystem.Collections.Generic;
118
114
usingMicrosoft.AspNetCore.Mvc;
119
115
usingDoccers.Core.Services;
120
116
usingUmbraco.Cms.Core.Models;
121
-
usingUmbraco.Cms.Web.Common.Controllers;
122
-
123
117
124
118
namespaceDoccers.Core.Controllers.Api;
125
119
126
-
publicclassTagsController : UmbracoApiController
120
+
[ApiController]
121
+
[Route("/umbraco/api/tags")]
122
+
publicclassTagsController : Controller
127
123
{
128
124
privatereadonlyICacheTagService_tagService;
129
125
@@ -133,7 +129,7 @@ public class TagsController : UmbracoApiController
133
129
_tagService=tagService;
134
130
}
135
131
136
-
[HttpGet]
132
+
[HttpGet("getdefaulttags")]
137
133
publicIEnumerable<TagModel> GetDefaultTags()
138
134
{
139
135
// As mentioned earlier we want tags from "default"
@@ -142,7 +138,7 @@ public class TagsController : UmbracoApiController
Copy file name to clipboardExpand all lines: 15/umbraco-cms/reference/cache/examples/tags.md
+6-10Lines changed: 6 additions & 10 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -16,7 +16,7 @@ For this example we're working with tags. On my site I have two tag properties:
16
16
17
17
We're going to expose an endpoint that allows us to get the tags from each group.
18
18
19
-
The tags from the `default` should be cached for a minute and the`blog` tags will be cached until site restart or if you publish a blog post node in the Backoffice.
19
+
The tags from the `default` should be cached for a minute. The`blog` tags will be cached until site restart or if you publish a blog post node in the Backoffice.
20
20
21
21
## Example
22
22
@@ -108,22 +108,18 @@ Now you can inject `ICacheTagService` in any constructor in your project - wohoo
108
108
109
109
Now that we have our service it's time to create an endpoint where we can fetch the (cached) tags.
110
110
111
-
{% hint style="warning" %}
112
-
The example below uses UmbracoApiController which is obsolete in Umbraco 14 and will be removed in Umbraco 15.
113
-
{% endhint %}
114
-
115
111
```csharp
116
112
usingSystem;
117
113
usingSystem.Collections.Generic;
118
114
usingMicrosoft.AspNetCore.Mvc;
119
115
usingDoccers.Core.Services;
120
116
usingUmbraco.Cms.Core.Models;
121
-
usingUmbraco.Cms.Web.Common.Controllers;
122
-
123
117
124
118
namespaceDoccers.Core.Controllers.Api;
125
119
126
-
publicclassTagsController : UmbracoApiController
120
+
[ApiController]
121
+
[Route("/umbraco/api/tags")]
122
+
publicclassTagsController : Controller
127
123
{
128
124
privatereadonlyICacheTagService_tagService;
129
125
@@ -133,7 +129,7 @@ public class TagsController : UmbracoApiController
133
129
_tagService=tagService;
134
130
}
135
131
136
-
[HttpGet]
132
+
[HttpGet("getdefaulttags")]
137
133
publicIEnumerable<TagModel> GetDefaultTags()
138
134
{
139
135
// As mentioned earlier we want tags from "default"
@@ -142,7 +138,7 @@ public class TagsController : UmbracoApiController
0 commit comments