You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am using @apollo/utils.keyvadapter to implement redis cache backend. The adapter makes redis or other cache backend a hard dependency. This means when the apollo server lost connection to redis server, any incoming requests will fail. It would be good to allow the redis client to retry connection. At the same time, any queries with cache control should still function by bypassing cache.
Meanwhile, I use the following code to achieve the goal.
classBetterKeyvAdapterextendsKeyvAdapter{// this will allow the query to bypass the cache if cache backend is not availableasyncget(key){try{returnawaitsuper.get(key);}catch(e){returnundefined;}}}
The text was updated successfully, but these errors were encountered:
It looks like you're looking for ErrorsAreMissesCache, a KeyValueCache implementation that wraps another KeyValueCache implementation. It is provided by @apollo/utils.keyvaluecache.
I am using
@apollo/utils.keyvadapter
to implement redis cache backend. The adapter makes redis or other cache backend a hard dependency. This means when the apollo server lost connection to redis server, any incoming requests will fail. It would be good to allow the redis client to retry connection. At the same time, any queries with cache control should still function by bypassing cache.Meanwhile, I use the following code to achieve the goal.
The text was updated successfully, but these errors were encountered: