title: How to cache profile picture with Picasso in MaterialDrawer library
body: <p>I'm using <a href="https://github.com/mikepenz/MaterialDrawer" rel="nofollow">MaterialDrawer</a> library and loading profile images with <a href="https://github.com/square/picasso" rel="nofollow">Picasso</a>. But I am unable to save it locally with Picasso and loading it from cache in the future.</p>
  
  <p>Before creating the drawer, </p>
  
  <pre><code> //below line is for loading profile image from url
      DrawerImageLoader.init(new DrawerImageLoader.IDrawerImageLoader() {
          @Override
          public void set(ImageView imageView, Uri uri, Drawable placeholder) {
              Picasso.with(imageView.getContext()).load(uri).placeholder(placeholder).into(imageView);
          }
  
          @Override
          public void cancel(ImageView imageView) {
              Picasso.with(imageView.getContext()).cancelRequest(imageView);
          }
  
          @Override
          public Drawable placeholder(Context ctx) {
              return null;
          }
  
      });
  </code></pre>
  
  <p>I wrote this as material library says. Then I set my profile picture:</p>
  
  <p><code>String myURL = "http://www.american.edu/uploads/profiles/large/chris_palmer_profile_11.jpg"
  profile = new ProfileDrawerItem().withName(person.getFullName()).withEmail(person.getStMajorName()).withIcon(myURL)</code></p>
  
  <p>But everytime I run the app, it loads it from the internet.</p>
  
  <p>How can I cache the image?</p>