Put an instance into the cache.

@param id
The id.
@param value
The instance.
@param mode
The mode.
171937
public void put(Id id, Object value, Mode mode) {
        if (Mode.WRITE.equals(mode)) {
            writeCache.put(id, value);
        }
        readCache.put(new CacheKey(id), value);
    }
893030
public void setId(String id) {
        logger.entering(id);
        this.id = id;
        logger.exiting();
    }
1356694
@Override
    public ValueWrapper putIfAbsent(final Object key, final Object value) {
        if (!cache.isEnabled()) {
            LOGGER.warn("Cache {} is disabled. Cannot put value under key {}", cache.getName(), key);
            return null;
        }

        if (key != null) {
            final String cacheKey = getKey(key);

            try {
                LOGGER.info("Put '{}' under key {} to cache {}", new Object[] { value, key, cache.getName() });
                final Object store = toStoreValue(value);
                final boolean added = cache.add(cacheKey, expiration, store, null);
                return added ? null : get(key);
            } catch (TimeoutException | CacheException | RuntimeException e) {
                logOrThrow(e, "An error has ocurred for cache {} and key {}", getName(), cacheKey, e);
            }
        } else {
            LOGGER.info("Cannot put to cache {} because key is null", cache.getName());
        }

        return null;
    }
616320
protected void putToCache(String cacheName, String key, Object value) {
        putToCache(cacheName, key, value, 0);
    }
908716
public void setId(String id)
	{
		if (id == null || id.length() == 0)
			throw new IllegalArgumentException(
			"id required in setId");

		this.setId(Integer.valueOf(id));
	}
521110
public void put(int index, Scriptable start, Object value) {
        if (start == this) {
            synchronized (this) {
                indexedProps.put(new Integer(index), value);
            }
        } else {
            start.put(index, start, value);
        }
    }
566208
public synchronized void add(int id, SICoreConnection connection) {
        if (tc.isEntryEnabled())
            SibTr.entry(tc, "add", "" + id);
        map.put(id, connection);
        if (tc.isEntryEnabled())
            SibTr.exit(tc, "add");
    }
1361511
static void register(final Object value) {
        synchronized (HashCodeBuilder.class) {
            if (getRegistry() == null) {
                REGISTRY.set(new HashSet<IDKey>());
            }
        }
        getRegistry().add(new IDKey(value));
    }
751687
public Object get(Id id, Mode mode) {
        Object value = writeCache.get(id);
        if (value == null) {
            value = readCache.get(new CacheKey(id));
            if (value != null && Mode.WRITE.equals(mode)) {
                writeCache.put(id, value);
            }
        }
        return value;
    }
329231
public static void setId(Object document, String id) {
		DocumentAccessor d = getAccessor(document);
		if (d.hasIdMutator()) {
			d.setId(document, id);
		}
	}
1068658
@Override
    public void setID(String id) {
        _ID = id;
        if (_store != null) {
            _store.setID(id);
        }
    }
867135
public void put(K key, V value) {
    mMap.compute(key, (k, entry) -> {
      onPut(key, value);
      if (entry == null && cacheIsFull()) {
        writeToBackingStore(key, value);
        return null;
      }
      if (entry == null || entry.mValue == null) {
        onCacheUpdate(key, value);
        return new Entry(key, value);
      }
      entry.mValue = value;
      entry.mReferenced = true;
      entry.mDirty = true;
      return entry;
    });
    wakeEvictionThreadIfNecessary();
  }
872045
public void deleteById(String id) {
    if (idToVersion.containsKey(id)) {
      String version = idToVersion.remove(id);
      expirationVersion.remove(version);
      versionToItem.remove(version);
      if (collectionCachePath != null
          && !collectionCachePath.resolve(version).toFile().delete()) {
        log.debug("couldn't delete " + version);
      }
    }
  }
812366
public
  void saveExprValue(int id, Object value){

   if (tc.isEntryEnabled())
      tc.entry(this,cclass, "saveExprValue", "id: " + new Integer(id) +",value: "+value);
    cacheTag[id] = generation;
    cacheValue[id] = value;
   if (tc.isEntryEnabled())
	 tc.exit(this,cclass, "saveExprValue");
  }
695052
public void setAccessed(String id) {
		T obj=get(id,null);
		if (obj!=null){
			obj.setAccessed();
		}
	}
670689
public static function saveToCache($id, $value)
    {
        $arrayCache = Configuration::getArrayCache();
        $cacheDriver = Configuration::getCacheDriver();

        $arrayCache->save($id, $value);
        if ($cacheDriver !== null) {
            $cacheDriver->save($id, $value);
        }
    }
1304010
public void setDBModified(int mode) {

        String value = MODIFIED_NO;

        if (mode == FILES_MODIFIED) {
            value = MODIFIED_YES;
        } else if (mode == FILES_NEW) {
            value = MODIFIED_NEW;
        }

        setProperty(db_modified, value);
        save();
    }