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: 15/umbraco-cms/implementation/services/README.md
+13Lines changed: 13 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -223,6 +223,19 @@ public class HandleUnPublishingHandler : INotificationHandler<ContentUnpublished
223
223
}
224
224
```
225
225
226
+
#### Accessing the Published Content Cache via IPublishedContentQuery
227
+
{% hint style="warning" %}
228
+
Sometimes you may want to fetch multiple content items from ids, where `UmbracoContext.Content` only allow to fetch a single content item by id.
229
+
However in a background task accessing content cache from injected `IPublishedContentQuery` or `IPublishedContentQueryAccessor` won't work as these rely on `HttpContext`.
#### Accessing the Published Content Cache from a Content Finder / UrlProvider
227
240
228
241
Inside a ContentFinder access to the content cache is possible by injecting `IUmbracoContextAccessor` into the constructor and provided via the PublishedRequest object:
0 commit comments