Search in sources :

Example 1 with SpCache

use of com.ljy.devring.cache.support.SpCache in project DevRing by LJYcoder.

the class CacheManager method spCache.

public SpCache spCache(String spName, int mode) {
    SpCache spCache = mMapSpCache.get(DEFAULT_SP_NAME + mode);
    if (spCache == null) {
        SharedPreferences defaultSp = mContext.getSharedPreferences(spName, mode);
        spCache = new SpCache(defaultSp);
        mMapSpCache.put(spName + mode, spCache);
    }
    return spCache;
}
Also used : SpCache(com.ljy.devring.cache.support.SpCache) SharedPreferences(android.content.SharedPreferences)

Aggregations

SharedPreferences (android.content.SharedPreferences)1 SpCache (com.ljy.devring.cache.support.SpCache)1