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
FileCacheOptions
not working after the header was introduced in FileCache settings in version 23.0.0
#2059
Comments
Hi Team we have also observed the same behaviour. It seems the request payload is not considered when caching the data. Hence cache returns the data for 1st request payload from the cache, for subsequent requests with different request payload. This is happening when Header is not set! Thanks |
Certainly...
|
@raman-m it's probably related to the fact that the body hashing is now disabled by default and it must be activated explicitly. But, as mentioned by @thiagoloureiro, the needed property isn't available in file configuration. So, I would recommend to deal with this issue before anything else... |
FileCacheOptions
not working after the header was introduced in FileCache settings in version 23.0.0
Understood! I guess we need to link the PR 2058 ... The bug fix will be released in current milestone. I don't want to make separate hotfix release: developers may to rollback to previous versions temporarily. So, the bugfix will be a part of version 23.3 P.S.
Firstly added in commit 47afc85#diff-e1943063e63a6438191010c566111bea5c47f4cb063c04c7cc6c91a8c4267812 by Tom many many years ago. I wonder the property was named with File prefix. And the most appropriate name is CacheOptions .Will renaming be a breaking change? It will be better to rename 👉 - public FileCacheOptions FileCacheOptions { get; set; }
+ public FileCacheOptions CacheOptions { get; set; } |
…ions` (#2058) * EnableContentHashing not being considered from appsettings * Adding CacheOptionsCreator, Injected IRegionCreator as Singleton. Should still add some acceptance tests that are definitely missing! * Adding caching global configuration since we messed up, ignoring an important breaking change with EnableContentHashing set to false by default * Adding some further acceptance tests, validating EnableContentHashing, validating global config too. * removing some debug content * TtlSeconds must be set * updating documentation * Update docs/features/caching.rst Co-authored-by: Raman Maksimchuk <dotnet044@gmail.com> * Update docs/features/caching.rst Co-authored-by: Raman Maksimchuk <dotnet044@gmail.com> * Removing RegionCreator, moving service collection extension method to dependencyInjection\Features etc. * adding unit tests for FileCacheOptions * some more null tests... * slight refactoring, updating ICacheOptionsCreator signature * some more design refactoring * Update src/Ocelot/Configuration/Creator/CacheOptionsCreator.cs Co-authored-by: Raman Maksimchuk <dotnet044@gmail.com> * Code review by @raman-m * Rename `FileCacheOptions` -> `CacheOptions` * Subtly transition to `CacheOptions`, ensuring compatibility with `FileCacheOptions` to avoid a breaking change * Not obsolete --------- Co-authored-by: Guillaume Gnaegi <58469901+ggnaegi@users.noreply.github.com> Co-authored-by: Raman Maksimchuk <dotnet044@gmail.com>
Discussed in #2054
Hi
We are facing issue regarding cache option, however in earlier version till v22.0.1 FileCacheOptions was working fine but after the release of v23.0.0 we are facing issue mentioned below in two cases.
Case 1: V.22.0.1
"FileCacheOptions": { "TtlSeconds": 15, "Region": "europe-central" }
It was working fine with the multiple requests. before the latest update
case2:
After the addition of new parameter named Header in FileCacheOptions there, we are facing issue on multiple requests in case one request is already generated and in the same configured cache expiry time if another request come with different values, then we are getting same response as per the first request.
Case 2: v23.2.2
"FileCacheOptions": {
"TtlSeconds": 15,
"Region": "europe-central"
}
As per documentation header is not mandatory, hence the cache option should work without header also, which is not the case.
Observed Behaviour
Please can you help us fix this as this seems to be a breaking change since version 23.0.0 as mentioned by Raman in the discussion.
Thanks,
Sheru Kumar Gaur
The text was updated successfully, but these errors were encountered: