title: How to clear cookies and cache of webview on Android when not in webview?
body: <p>Upon a user's sign out from my app I am clearing everything that may have been cached previously from the webview by calling this method:  </p>
  
  <pre><code> public void clearCookiesAndCache(Context context){
      CookieSyncManager.createInstance(context);
      CookieManager cookieManager = CookieManager.getInstance();
  
      if (Build.VERSION.SDK_INT &gt;= Build.VERSION_CODES.LOLLIPOP) {
          cookieManager.removeAllCookies(null);
      }
      else {
          cookieManager.removeAllCookie();
      }        
  }
  </code></pre>
  
  <p>CookieSyncManager is marked as deprecated, however. CookieSyncManager.createInstance(context) is necessary to be called, however, if you have not loaded the webview previously. So how are we supposed to clear the cookies and cache without using the deprecated CookieSyncManager in cases where the webview may not have been previously loaded?</p>