The Wayback Machine - https://web.archive.org/web/20220213151615/https://github.com/dotnet/aspnetcore/issues/40187
Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CacheTagHelper <cache> works for other elements but not for a particular view component? #40187

Open
1 task done
aloksharma1 opened this issue Feb 13, 2022 · 0 comments
Open
1 task done

Comments

@aloksharma1
Copy link

@aloksharma1 aloksharma1 commented Feb 13, 2022

Is there an existing issue for this?

  • I have searched the existing issues

Describe the bug

I have a live website where results of list rendered html are cached in cache tag helper as they should, but one cache tag helper is failing to cache and always request backend to generate new data. Tested with DateTime.Now to check the issue and the problem occurs in only this cached data. i have a bunch of other cache tags which provides cached data without issue.

Expected Behavior

tag helper must cache html data after first render from viewcomponent.

Steps To Reproduce

no idea, i have a live site with lots of cache tagged view components in Layout & home page(total 4); but only this one is having issue even the footer element is cached, while this view component is in body.

Exceptions (if any)

none

.NET Version

5.0.404

Anything else?

https://therattlecat.com/

<cache enabled="true" expires-after="@TimeSpan.FromMinutes(10)" priority="Microsoft.Extensions.Caching.Memory.CacheItemPriority.Low">                                        
       @DateTime.Now
       <vc:blog-post-list-group-by-types viewname="HomeGroupByTypePosts" viewtype="CustomViews" blog-group-by="Category" blog-type="Blogs" take="1" select-featured="false" select-popular="true" select-full-info="false" order-by="Asc" num="1" size="20"></vc:blog-post-list-group-by-types>
</cache>

This provides a data from a nested list within list, while other view components only deal with a linear list (maybe cache tag helper is avoiding complex data caches, but should it be only caching the end result html?)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
1 participant