Closed pikkenix closed 3 years ago
I had the same problem since the last update, it was working perfectly but for some reason after updating some libs something stopped to work.
Btw, I solved the issue with the requestMethod param:
_dioCacheManager.deleteByPrimaryKey(path, requestMethod: "GET");
I hope it helps!
I guess I'm doing something wrong but I cannot seem to delete anything from the cache...
Here is my code. My dio request: `
DioCacheManager _dioCacheManager;
void setupDio() { _dioCacheManager = DioCacheManager(CacheConfig()); dio.interceptors.add(_dioCacheManager.interceptor); }
Options createOptions(bool withCache) { Options options = Options(headers: {'Authorization': 'Bearer $_accessToken'});
Future<List> getLists(
{@required int teamId, @required int position}) async {
assert(teamId != null);
}`
My code for clearing this requests cache:
DioCacheManager _dioCacheManager; _dioCacheManager = DioCacheManager(CacheConfig()); String key = '_baseUrl + '/api/Draft/GetLists'; bool res = await _dioCacheManager.deleteByPrimaryKey(key);
This always returns false, what am I doing wrong?