-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
#2054 #2059 Manage EnableContentHashing
setting by global CacheOptions
#2058
#2054 #2059 Manage EnableContentHashing
setting by global CacheOptions
#2058
Conversation
Thank you, Thiago! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hello thanks, it's fine, but I would like to check the CacheOptions creation. It looks a bit like a hack...
EnableContentHashing
not being considered from appsettings.json
…uld still add some acceptance tests that are definitely missing!
It is related to the following issue: #2059 |
…mportant breaking change with EnableContentHashing set to false by default
@raman-m @thiagoloureiro I have added a global configuration for the cache options. Since we introduced a breaking change by adding the property EnableContentHashing and setting it to false by default, I think the users shouldn't bear the burden. That's why I thought adding the global configuration point EnableContentHashing would help most of them. The documentation will be updated too. |
@raman-m It's ready for review. I'm still using Bddfy, it was straightforward. And there is a silly problem the application is expecting TtlSeconds to be explicitly set for each route, since TtlSeconds > 0 -> IsCached. |
EnableContentHashing
not being considered from appsettings.json
EnableContentHashing
setting by global CacheOptions
@raman-m I have added some unit tests for the CacheOptionsCreator, and implemented most of your suggestions |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Technically we could merge, but I'd like to propose more...
Wait for my next commits plz!
Co-authored-by: Raman Maksimchuk <dotnet044@gmail.com>
@raman-m it's sound for me, should I squash and merge? |
@ggnaegi Please don't merge yet! Hold on for a 10-20 minutes... I want to present a commit related to the property name. |
…eCacheOptions` to avoid a breaking change
@ggnaegi The commit found at 3290aa6 reflects my earlier suggestion regarding the proposed renaming. I'm confident that this commit does not introduce any breaking changes. Please share your thoughts. |
@raman-m I'm not sure about FileCacheOptions being renamed to CacheOptions. I would prefer keeping FileCacheOptions for now. For me it was all sound and we are going now a step too far. I would prefer having those changes in another PR. |
@ggnaegi Understood! Reverting... |
@raman-m Ok, I got it, I just realized I named the Global FileCacheOptions CacheOptions... Well... Are you ok with that, and we announce the community that in a next version we will rename it? |
TODO
|
thanks for adding all the comments and commits guys! |
Fixes #2059
FileCacheOptions
not working after the header was introduced in FileCache settings in version 23.0.0 #2059Proposed Changes
This PR is prepared to fix the
EnableContentHashing
not being considered onocelot.json
.FileCacheOptions didn't have the option to fetch from the config and also the RoutesCreator didn't call the overload with the settings.