@@ -0,0 +1,1311 @@
+package org.ccci.gto.android.common.support.v4.content;%0A%0Aimport android.content.Context;%0Aimport android.support.annotation.MainThread;%0Aimport android.support.annotation.NonNull;%0Aimport android.support.annotation.Nullable;%0Aimport android.support.v4.content.AsyncTaskLoader;%0A%0Apublic abstract class CachingAsyncTaskLoader%3CD%3E extends AsyncTaskLoader%3CD%3E %7B%0A    @Nullable%0A    private D mData;%0A%0A    public CachingAsyncTaskLoader(@NonNull final Context context) %7B%0A        super(context);%0A    %7D%0A%0A    /* BEGIN lifecycle */%0A%0A    @Override%0A    @MainThread%0A    protected void onStartLoading() %7B%0A        super.onStartLoading();%0A%0A        // deliver already loaded data%0A        if (mData != null) %7B%0A            deliverResult(mData);%0A        %7D%0A%0A        // force a fresh load if needed%0A        if (takeContentChanged() %7C%7C mData == null) %7B%0A            forceLoad();%0A        %7D%0A    %7D%0A%0A    @Override%0A    @MainThread%0A    protected void onReset() %7B%0A        super.onReset();%0A        mData = null;%0A    %7D%0A%0A    /* END lifecycle */%0A%0A    @Override%0A    @MainThread%0A    public void deliverResult(@Nullable final D data) %7B%0A        // An async query came in while the loader is reset%0A        if (isReset()) %7B%0A            return;%0A        %7D%0A%0A        mData = data;%0A%0A        if (isStarted()) %7B%0A            super.deliverResult(data);%0A        %7D%0A    %7D%0A%7D%0A

implement a simple data caching AsyncTaskLoader