I have created an ArticleService used from
1/ a public API Controller (using Umbraco as a Headless CMS)
2/ a Controller using route highjacking, to show Articles List on a umbraco Hosted site.
I finally recreated a function looping through Articles with a Contains() method overs the tags. of course it's being cached. But if someone has a clue ...
System.ObjectDisposedException / "Snapshot " / TagQuery
Hi friends from the internet,
I have created an ArticleService used from 1/ a public API Controller (using Umbraco as a Headless CMS) 2/ a Controller using route highjacking, to show Articles List on a umbraco Hosted site.
I followed this example : https://our.umbraco.com/documentation/reference/cache/examples/tags
the only thing is that the API can Query using different tags, and we have plenty of different tags (approx 40).
So : 1/ ArticleApiController uses ArticleService
to do a GetArticlesByTag :

2/ which uses Article Service and TagService :

3/ everything is registered using DI :
Unfortunately, after 1 request, I got an error, if I change the Tags Requested :
searched = _tagQuery.GetContentByTag(tag).ToList();
Any Idea ?
I finally recreated a function looping through Articles with a Contains() method overs the tags. of course it's being cached. But if someone has a clue ...
is working on a reply...