Closed thiagoloureiro closed 2 months ago
Thank you, Thiago! What issue is it related to?
It is related to the following issue: https://github.com/ThreeMammals/Ocelot/issues/2059
@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.
@raman-m I have added some unit tests for the CacheOptionsCreator, and implemented most of your suggestions
@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.
@ggnaegi The commit found at https://github.com/ThreeMammals/Ocelot/pull/2058/commits/3290aa64f0b2f4b16d929d5acee4ddb10ae1dae5 reflects my earlier suggestion regarding the proposed renaming. I'm confident that this commit does not introduce any breaking changes. Please share your thoughts.
@ggnaegi commented:
it's sound for me, should I squash and merge?
Yes, please do, provided you have no objections to my last commit https://github.com/ThreeMammals/Ocelot/pull/2058/commits/3290aa64f0b2f4b16d929d5acee4ddb10ae1dae5.
@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...
@ggnaegi The recent changes have been reverted❕ The proof -> link I think we're ready to merge now. 😃 You could press the magic button 😜
@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?
FileCacheOptions
to CacheOptions
post-releasethanks for adding all the comments and commits guys!
Fixes #2059
2054
2059
Proposed 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.