core/src/in/srain/cube/cache/CacheManager.java
@SuppressWarnings({"unused"})
    public <T> T requestCacheSync(ICacheAble<T> cacheAble) {

        if (cacheAble.cacheIsDisabled()) {
            return null;
        }

        // try to find in runtime cache
        String cacheKey = cacheAble.getCacheKey();
        CacheMetaData mRawData = mMemoryCache.get(cacheKey);
        if (mRawData != null) {
            if (DEBUG) {
                CLog.d(LOG_TAG, "key: %s, exist in list", cacheKey);
            }
        }

        // try read from cache data
        if (mRawData == null) {
            boolean hasFileCache = mFileCache.getDiskCache().has(cacheKey);
            if (hasFileCache) {
                String cacheContent = mFileCache.read(cacheKey);
                JsonData jsonData = JsonData.create(cacheContent);
                mRawData = CacheMetaData.createFromJson(jsonData);
            }
        }

        // try to read from assets cache file
        if (mRawData == null) {
            String assertInitDataPath = cacheAble.getAssertInitDataPath();
            if (assertInitDataPath != null && assertInitDataPath.length() > 0) {
                String cacheContent = DiskFileUtils.readAssert(mContext, assertInitDataPath);
                if (!TextUtils.isEmpty(cacheContent)) {
                    mRawData = CacheMetaData.createInvalidated(cacheContent);
                    putDataToMemoryCache(cacheKey, mRawData);
                }
            }
        }

        if (mRawData != null) {
            boolean outOfDate = mRawData.isOutOfDateFor(cacheAble);
            if (outOfDate && !cacheAble.useCacheAnyway()) {
                return null;
            }
            JsonData data = JsonData.create(mRawData.getData());
            T ret = cacheAble.processRawDataFromCache(data);
            cacheAble.onCacheData(CacheResultType.FROM_INIT_FILE, ret, outOfDate);
            return ret;
        }

        if (DEBUG) {
            CLog.d(LOG_TAG, "key: %s, cache file not exist", cacheKey);
        }
        return null;
    }
@SuppressWarnings({"unused"})
    public <T> T requestCacheSync(ICacheAble<T> cacheAble) {

        if (cacheAble.cacheIsDisabled()) {
            return null;
        }

        // try to find in runtime cache
        String cacheKey = cacheAble.getCacheKey();
        CacheMetaData mRawData = mMemoryCache.get(cacheKey);
        if (mRawData != null) {
            if (DEBUG) {
                CLog.d(LOG_TAG, "key: %s, exist in list", cacheKey);
            }
        }

        // try read from cache data
        if (mRawData == null) {
            boolean hasFileCache = mFileCache.getDiskCache().has(cacheKey);
            if (hasFileCache) {
                String cacheContent = mFileCache.read(cacheKey);
                JsonData jsonData = JsonData.create(cacheContent);
                mRawData = CacheMetaData.createFromJson(jsonData);
            }
        }

        // try to read from assets cache file
        if (mRawData == null) {
            String assertInitDataPath = cacheAble.getAssertInitDataPath();
            if (assertInitDataPath != null && assertInitDataPath.length() > 0) {
                String cacheContent = DiskFileUtils.readAssert(mContext, assertInitDataPath);
                if (!TextUtils.isEmpty(cacheContent)) {
                    mRawData = CacheMetaData.createInvalidated(cacheContent);
                    putDataToMemoryCache(cacheKey, mRawData);
                }
            }
        }

        if (mRawData != null) {
            boolean outOfDate = mRawData.isOutOfDateFor(cacheAble);
            if (outOfDate && !cacheAble.useCacheAnyway()) {
                return null;
            }
            JsonData data = JsonData.create(mRawData.getData());
            T ret = cacheAble.processRawDataFromCache(data);
            cacheAble.onCacheData(CacheResultType.FROM_INIT_FILE, ret, outOfDate);
            return ret;
        }

        if (DEBUG) {
            CLog.d(LOG_TAG, "key: %s, cache file not exist", cacheKey);
        }
        return null;
    }
Request cache synchronously.
If there is not cache data available, return null,
and {@link ICacheAble#onNoCacheData} will not no be called.

@param cacheAble
@param <T>
@return if not cache data available, return null, {@link ICacheAble#onNoCacheData} will not no be called.