-
Notifications
You must be signed in to change notification settings - Fork 658
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
ExpireDateCacheResolver issue #4831
Comments
Hi! Just to be sure, are you using the incubating normalized cache ( At the moment, the storage of the cache headers (where the dates are stored) only works with those. If yes, make also sure to initialize the SQLite cache with You can have a look at this test to check if anything is different in your setup. |
Hello @BoD , What's best way to resolve this? |
Can you try to exclude the transitive dependency like so: implementation("com.apollographql.apollo3:apollo-rx2-support") {
exclude("com.apollographql.apollo3:apollo-normalized-cache")
} |
@BoD Thanks! I am able to compile the code now. |
@ynkm169 Did you pass |
@BoD We don't use Sql cache, only the memory cache. I understand that we can use memory cache expireAfterMilis option. |
Sorry I didn't realize you were using the memory cache only! Currently this is not available with the memory cache, but only with the SQL one. |
Thanks for confirming, will close out the ticket. I don't think we currently have a use case to specify expiry at a query level. We will migrate our feature to GraphQL once this feature request is delivered: apollographql/apollo-kotlin-normalized-cache-incubating#52 |
Version
3.8.0
Summary
Hello.
I couldn't get it to work. This is the cache control header server send to client.
cache-control: max-age=10
Note, the following is just guesses. I am not 100% if my guess is correct. Apollo code is quite deep.
The reason it is not working is MAYBE because maybeWriteToCache seems to write empty header into cache.
It should probably call this instead
executionContext[HttpInfo]?.headers
Another thing I noticed is
StoreExpirationInterceptor intercept is returning correct expires value. However, store.writeOperation inside maybeWriteToCache is invoked before StoreExpirationInterceptor intercept.
Steps to reproduce the behavior
No response
Logs
The text was updated successfully, but these errors were encountered: