Yes, this is bad API design of theirs, but I just came across such situation an a foreign API that I am using. And this is actually an unexpected error on their side that comes and goes (actually comes quite often). This means that while using cachedRequest (or request too) sometimes I end up inside "success" case, even though the body says that there was an unexpected error.. and as the request becomes cached (haha, as it was 200 response), I cannot escape this error anymore, without deleting the entire cache directory.. not very handy..
Is there any workaround recommendation? Any feature of invalidating the cache for certain request? This would be really useful for me at the moment.. I know I could set ttl to lower value, but that would remove most of the benefits of using this library for me (now my ttl is 24 hours..).