@Override
  public boolean equals(@Nullable Object o) {
    if (!(o instanceof ImageRequest)) {
      return false;
    }
    ImageRequest request = (ImageRequest) o;
    if (sUseCachedHashcodeInEquals) {
      int a = mHashcode;
      int b = request.mHashcode;
      if (a != 0 && b != 0 && a != b) {
        return false;
      }
    }
    if (mLocalThumbnailPreviewsEnabled != request.mLocalThumbnailPreviewsEnabled) return false;
    if (mIsDiskCacheEnabled != request.mIsDiskCacheEnabled) return false;
    if (mIsMemoryCacheEnabled != request.mIsMemoryCacheEnabled) return false;
    if (!Objects.equal(mSourceUri, request.mSourceUri)
        || !Objects.equal(mCacheChoice, request.mCacheChoice)
        || !Objects.equal(mDiskCacheId, request.mDiskCacheId)
        || !Objects.equal(mSourceFile, request.mSourceFile)
        || !Objects.equal(mBytesRange, request.mBytesRange)
        || !Objects.equal(mImageDecodeOptions, request.mImageDecodeOptions)
        || !Objects.equal(mResizeOptions, request.mResizeOptions)
        || !Objects.equal(mRequestPriority, request.mRequestPriority)
        || !Objects.equal(mLowestPermittedRequestLevel, request.mLowestPermittedRequestLevel)
        || !Objects.equal(mCachesDisabled, request.mCachesDisabled)
        || !Objects.equal(mDecodePrefetches, request.mDecodePrefetches)
        || !Objects.equal(mResizingAllowedOverride, request.mResizingAllowedOverride)
        || !Objects.equal(mDownsampleOverride, request.mDownsampleOverride)
        || !Objects.equal(mRotationOptions, request.mRotationOptions)
        || mLoadThumbnailOnly != request.mLoadThumbnailOnly) {
      return false;
    }
    final CacheKey thisPostprocessorKey =
        mPostprocessor != null ? mPostprocessor.getPostprocessorCacheKey() : null;
    final CacheKey thatPostprocessorKey =
        request.mPostprocessor != null ? request.mPostprocessor.getPostprocessorCacheKey() : null;
    if (!Objects.equal(thisPostprocessorKey, thatPostprocessorKey)) return false;
    return mDelayMs == request.mDelayMs;
  }
Returns whether the use of the cache is enabled for read or write according to given mask.
imagepipeline/src/main/java/com/facebook/imagepipeline/request/ImageRequest.java