code: function clearCache() {
        var defer = $q.defer();
  
        _checkImgCacheReady()
          .then(function() {
            ImgCache.clearCache(defer.resolve, defer.reject);
          })
          .catch(defer.reject);
  
        return defer.promise;
      }
docs: Clears all cahced files.