Lines Matching refs:cache

110     // want to cache the existence of a key, but not store its value.
467 // threads might wind up here, the second having read the cache entries
517 // Only populate the globals cache once, for the owning user
525 // Slurp all values (if sane in number & size) into cache.
526 private void fullyPopulateCache(DatabaseHelper dbHelper, String table, SettingsCache cache) {
534 synchronized (cache) {
535 cache.evictAll();
536 cache.setFullyMatchesDisk(true); // optimistic
542 cache.populate(name, value);
547 cache.setFullyMatchesDisk(false);
548 Log.d(TAG, "row count exceeds max cache entries for table " + table);
550 if (LOCAL_LOGV) Log.d(TAG, "cache for settings table '" + table
551 + "' rows=" + rows + "; fullycached=" + cache.fullyMatchesDisk());
651 * Used for wiping a whole cache on deletes when we're not
655 SettingsCache cache = cacheForTable(callingUser, tableName);
656 if (cache == null) {
659 synchronized (cache) {
660 cache.evictAll();
661 cache.mCacheFullyMatchesDisk = false;
703 SettingsCache cache;
714 cache = sSystemCaches.get(callingUser);
715 return lookupValue(dbHelper, TABLE_SYSTEM, cache, request);
730 cache = sSecureCaches.get(callingUser);
731 return lookupValue(dbHelper, TABLE_SECURE, cache, request);
735 // fast path: owner db & cache are immutable after onCreate() so we need not
853 final SettingsCache cache, String key) {
854 if (cache == null) {
855 Slog.e(TAG, "cache is null for user " + UserHandle.getCallingUserId() + " : key=" + key);
858 synchronized (cache) {
859 Bundle value = cache.get(key);
865 } else if (cache.fullyMatchesDisk()) {
883 return cache.putIfAbsent(key, cursor.getString(0));
891 cache.putIfAbsent(key, null);
966 SettingsCache cache = cacheForTable(callingUser, args.table);
984 SettingsCache.populate(cache, values[i]);
1122 SettingsCache cache = cacheForTable(desiredUserHandle, args.table);
1124 if (SettingsCache.isRedundantSetValue(cache, name, value)) {
1143 SettingsCache.populate(cache, initialValues); // before we notify
1306 * associated helper functions to keep cache coherent with the
1320 * Is the whole database table slurped into this cache?
1342 * Atomic cache population, conditional on size of value and if
1361 * Populates a key in a given (possibly-null) cache.
1363 public static void populate(SettingsCache cache, ContentValues contentValues) {
1364 if (cache == null) {
1369 Log.w(TAG, "null name populating settings cache.");
1373 cache.populate(name, value);
1388 * checking our cache first (but without faulting it in),
1391 public static boolean isRedundantSetValue(SettingsCache cache, String name, String value) {
1392 if (cache == null) return false;
1393 synchronized (cache) {
1394 Bundle bundle = cache.get(name);