Restores the value from a table cache for usage.

        :param      value   | <variant>
                    context | <orb.Context> || None
194230
def restore(self, value, context=None):
        
        # ensure this value is a string type
        if isinstance(value, (str, unicode)):
            value = projex.text.decoded(value)

        return super(AbstractStringColumn, self).restore(value, context)
1065392
public synchronized Object put(final String key, final Object value) {
		try {
			if (maxCacheSize == 0) {
				return null;
			}

			// if the key isn't in the cache and the cache is full...
			if (!super.containsKey(key) && !list.isEmpty()
					&& list.size() + 1 > maxCacheSize) {
				final Object deadKey = list.removeLast();
				super.remove(deadKey);
			}

			updateKey(key);
		} catch (Exception e) {
			log.log(Level.SEVERE, "put", e);
		}
		return super.put(key, value);
	}
787660
private V putForNullKey(V value) {
	for (Entry<K, V> e = table[0]; e != null; e = e.next) {
	    if (e.key == null) {
		V oldValue = e.value;
		e.value = value;
		e.recordAccess(this);
		return oldValue;
	    }
	}
	modCount++;
	addEntry(0, null, value, 0);
	return null;
    }
502397
def _reset_values(self, instance):
        """"""
        self.value = None
        self.reference.value = None
        instance.__dict__.pop(self.field_name, None)
        instance.__dict__.pop(self.reference.field_name, None)
        self.reference.delete_cached_value(instance)
551779
def set(self, key, value):
        
        return uwsgi.cache_set(key, value, self.timeout, self.name)
94963
def restorenx(self, name, value, pttl=0):
        
        return self.eval(lua_restorenx, 1, name, pttl, value)
939391
@Override
    public void restoreState(final FacesContext context, final Object state) {
        if (state == null) {
            return;
        }

        final Object values[] = (Object[]) state;
        super.restoreState(context, values[0]);
        final Object restoredSubmittedValues = values[1];
        final Object restoredLocalValues = values[2];
        final Object restoredInvalidUpdates = values[3];
        final Object restoredColMappings = values[4];
        final Object restoredSortedList = values[5];
        final Object restoredRowMap = values[6];
        final Object restoredRowNumbers = values[7];

        if (restoredSubmittedValues == null) {
            submittedValues.clear();
        }
        else {
            submittedValues = (Map<SheetRowColIndex, String>) restoredSubmittedValues;
        }

        if (restoredLocalValues == null) {
            localValues.clear();
        }
        else {
            localValues = (Map<SheetRowColIndex, Object>) restoredLocalValues;
        }

        if (restoredInvalidUpdates == null) {
            getInvalidUpdates().clear();
        }
        else {
            invalidUpdates = (List<SheetInvalidUpdate>) restoredInvalidUpdates;
        }

        if (restoredColMappings == null) {
            columnMapping = null;
        }
        else {
            columnMapping = (Map<Integer, Integer>) restoredColMappings;
        }

        if (restoredSortedList == null) {
            getFilteredValue().clear();
        }
        else {
            setFilteredValue((List<Object>) restoredSortedList);
        }

        if (restoredRowMap == null) {
            rowMap = null;
        }
        else {
            rowMap = (Map<String, Object>) restoredRowMap;
        }

        if (restoredRowNumbers == null) {
            rowNumbers = null;
        }
        else {
            rowNumbers = (Map<String, Integer>) restoredRowNumbers;
        }
    }
1059694
public synchronized void put(Key key, Value value) {
    long valueSize = value.getSize();
    if (maxSizeBytes == 0 || maxSizeEntries == 0 || valueSize * 2 > maxSizeBytes) {
      // Just destroy the value if cache is disabled or if entry would consume more than a half of
      // the cache
      evictValue(value);
      return;
    }
    currentSize += valueSize;
    Value prev = cache.put(key, value);
    if (prev == null) {
      return;
    }
    // This should be a rare case
    currentSize -= prev.getSize();
    if (prev != value) {
      evictValue(prev);
    }
  }
535401
def discard(self, value):
        ''''''
        return self.cache.remove((self.value_pickler.dumps(value),))
701522
def ne_(self, value):
        ''' 
        '''
        if isinstance(value, QueryField):
            return self.__cached_id != value.__cached_id
        return self.__comparator('$ne', value)
1050346
def clean(self, value):
        
        if isinstance(value, FileStorage):
            return self.storage.save(value)
        return value
710987
public void refreshCachedValues() {
        if (noteColumn) {
            note = getHistoryReference().hasNote();
        }
        if (tagsColumn) {
            tags = listToCsv(getHistoryReference().getTags());
        }
        if (highestAlertColumn) {
            alertRiskCellItem = AlertRiskTableCellItem.getItemForRisk(getHistoryReference().getHighestAlert());
        }
    }
779125
def set_value(cache, key, value):
    
    with cache as redis_connection:
        return redis_connection.set(key, value)
762102
public void restore(CachedObject object) {

        writeLock.lock();

        try {
            int i = object.getPos();

            cache.put(i, object);

            // was previously used for text tables
            if (storeOnInsert) {
                saveRow(object);
            }
        } finally {
            writeLock.unlock();
        }
    }
17589
function _cacheData(key, value) {
    cache[key] = { timeStamp: _getTimeStamp(), value: value };
    _deletePromiseWaiting(key);
    return value;
}
981383
def store(self, value, context=None):
        
        if isinstance(value, datetime.datetime):
            # ensure we have some timezone information before converting to UTC time
            if value.tzinfo is None:
                # match the server information
                tz = pytz.timezone(orb.system.settings().server_timezone)
                value = tz.localize(value)
            value = value.astimezone(pytz.utc).replace(tzinfo=None)
        return super(DatetimeWithTimezoneColumn, self).store(value, context=context)
353650
def fix(self, value=None):
        

        if value is None:
            self._impl.fix()
        else:
            self._impl.fix(value)