Caches a concept so it does not have to be rebuilt later.

@param concept The concept to be cached.
760927
public void cacheConcept(Concept concept) {
        conceptCache.put(concept.id(), concept);
        if (concept.isSchemaConcept()) {
            SchemaConcept schemaConcept = concept.asSchemaConcept();
            schemaConceptCache.put(schemaConcept.label(), schemaConcept);
            labelCache.put(schemaConcept.label(), schemaConcept.labelId());
        }
    }
398674
function(code, name, concept) {
  Concept.call(this, name);
  /**
   * Gets or sets the value of the abs code.
   * @type {String}
   */
  this.code = code;

  /**
   * Gets the list of abs codes contained in this group.  This property is observable.
   * @type {AbsCode[]}
   */
  this.items = [];

  /**
   * Gets or sets the parent for a code.  This property is observable.
   * @type {AbsCode|AbsConcept}
   */
  this.parent = undefined;

  /**
   * Gets or sets the ultimate parent concept for a code.  This property is observable.
   * @type {AbsConcept}
   */
  this.concept = concept;

  /**
   * Flag to say if this if this concept only allows more than one active child.
   * Defaults to the same as concept.
   * Only meaningful if this concept has an items array.
   * @type {Boolean}
   */
  this.allowMultiple = this.concept.allowMultiple;

  /**
   * Gets or sets a value indicating whether this abs code is currently open.  When an
   * item is open, its child items (if any) are visible.  This property is observable.
   * @type {Boolean}
   */
  this.isOpen = false;

  /**
   * Gets or sets a value indicating whether this abs code is currently active.  When a
   * code is active, it is included in the abs data query.  This property is observable.
   * @type {Boolean}
   */
  this.isActive = false;

  /**
   * Flag to say if this is selectable.  This property is observable.
   * @type {Boolean}
   */
  this.isSelectable = true; //for ko

  knockout.track(this, ["code", "items", "isOpen", "isActive"]);
}
312966
public void addChild(Concept concept) {
        if (taxonomy != concept.taxonomy) {
            throw new IllegalArgumentException("Concepts are not from the same taxonomy.");
        }

        if (children == null) {
            children = new ArrayList<>();
        }
        
        children.add(concept);
        concept.parent = this;
    }
93205
protected static synchronized void initCache() {
        if (m_Cache == null) {
            m_Cache = new ClassCache();
            // failed to locate any classes on the classpath, maybe inside Weka?
            // try loading fixed list of classes
            if (m_Cache.isEmpty()) {
                InputStream inputStream = null;
                try {
                    inputStream = m_Cache.getClass().getResourceAsStream(CLASS_LIST);
                    m_Cache = new ClassCache(new FixedClassListTraversal(inputStream));
                }
                catch (Exception e) {
                    System.err.println("Failed to initialize class cache from fixed list (" + CLASS_LIST + ")!");
                    e.printStackTrace();
                }
                finally {
                    if (inputStream != null) {
                        try {
                            inputStream.close();
                        }
                        catch (Exception e) {
                            // ignored
                        }
                    }
                }
            }
        }
    }
1005426
public void initProcessDefinitionCache() {
    if (processDefinitionCache == null) {
      if (processDefinitionCacheLimit <= 0) {
        processDefinitionCache = new DefaultDeploymentCache<ProcessDefinitionCacheEntry>();
      } else {
        processDefinitionCache = new DefaultDeploymentCache<ProcessDefinitionCacheEntry>(processDefinitionCacheLimit);
      }
    }
  }
1298317
void cache(ManagedObject managedObject) {
        // Make a local reference to cachedManagedObjects in case it is changing, there is a risk that 
        // the same slot in cachedMangedObjects will be used twice, in that case the Object is not 
        // cached and will be read again when referenced.
        java.lang.ref.SoftReference[] localCachedManagedObjects = cachedManagedObjects;
        int localICache = iCache++;
        if (localICache >= localCachedManagedObjects.length) {
            iCache = 0;
            localICache = 0;
        }

        localCachedManagedObjects[localICache] = new java.lang.ref.SoftReference(managedObject);
        managedObject.objectStoreCacheIndex = localICache;
    }
1303799
@Override
	public void cacheResult(List<CPDefinition> cpDefinitions) {
		for (CPDefinition cpDefinition : cpDefinitions) {
			if (entityCache.getResult(
						CPDefinitionModelImpl.ENTITY_CACHE_ENABLED,
						CPDefinitionImpl.class, cpDefinition.getPrimaryKey()) == null) {
				cacheResult(cpDefinition);
			}
			else {
				cpDefinition.resetOriginalValues();
			}
		}
	}
995874
public void cache(Map<String, Object> resources) {
		verifyState();

		if (!cacheLocked.get()) {
			resourceCache.get().putAll(resources);
		}
	}
697016
public static void initialize()
    {
        if (InfinispanCache.get().exists(Association.IDCACHE)) {
            InfinispanCache.get().<Long, Association>getCache(Association.IDCACHE).clear();
        } else {
            InfinispanCache.get().<Long, Association>getCache(Association.IDCACHE)
                            .addListener(new CacheLogListener(Association.LOG));
        }
    }
769885
@Override
    public void build(Concept parent) throws OntologyBuildException {
        if (!this.skipProviderHierarchy) {
            try {
                root = this.metadata.getOrCreateHardCodedFolder("Provider");
                root.setFactTableColumn("provider_id");
                root.setTableName("provider_dimension");
                root.setColumnName("provider_path");
                if (parent != null) {
                    root.setAlreadyLoaded(parent.isAlreadyLoaded());
                    parent.add(root);
                }
                alpha = createAlphaCategoryConcepts();
            } catch (InvalidConceptCodeException ex) {
                throw new OntologyBuildException("Could not build provider concept tree", ex);
            }
        }
    }
257080
public static void initialize()
    {
        if (InfinispanCache.get().exists(DBProperties.CACHENAME)) {
            InfinispanCache.get().<String, String>getCache(DBProperties.CACHENAME).clear();
        } else {
            InfinispanCache.get().<String, String>getCache(DBProperties.CACHENAME)
                            .addListener(new CacheLogListener(DBProperties.LOG));
        }
        DBProperties.cacheOnStart();
    }
522480
public void cache() {
        if (!isCached.getAndSet(true)) {
            this.cache = node.isCache();
            this.cacheHint = node.getCacheHint();
            node.setCache(true);
            node.setCacheHint(CacheHint.SPEED);
            if (node instanceof Region) {
                this.cacheShape = ((Region) node).isCacheShape();
                this.snapToPixel = ((Region) node).isSnapToPixel();
                ((Region) node).setCacheShape(true);
                ((Region) node).setSnapToPixel(true);
            }
        }
    }
740619
private void persistCaches() {
		for (Entry<CacheKey, Map<String, String>> cacheEntry : caches.entrySet()) {
			persistCache(cacheEntry.getKey().projectName, cacheEntry.getKey().projectVersion, cacheEntry.getValue());
		}
	}
343649
public static synchronized void init(Context context) {
        mContext = context;

        // Set the appropriate log TAG
        setTAG(QuickUtils.system.getApplicationNameByContext());

        // resets all timestamps
        QuickUtils.timer.resetAllTimestamps();

        // init Rest
        QuickUtils.rest.init();

        // init image cache
        QuickUtils.imageCache.initialize(context);

        // init the objects cache
        try {
            cacheMagic.init(4096); // in bytes
        } catch (Exception e) {
           QuickUtils.log.e("Error initing cache");
        }
    }
1023758
public void cache(K name, V data) {

		if ( data == null){
			return;
		}
		if ( serializedCache != null){


			logger.debug("Caching {}  {}", name, data);

			serializedCache.put(name,data);


			// every 1000 objects we are writing to disk
			if ( serializedCache.keySet().size() % 1000 == 0 ) {

				flushCache();

			}

		}


	}
128589
private static void initialize(final boolean _restart)
        throws CacheReloadException
    {
        if (InfinispanCache.get().exists(IndexDefinition.UUIDCACHE)) {
            if (_restart) {
                InfinispanCache.get().<UUID, IndexDefinition>getCache(IndexDefinition.UUIDCACHE).clear();
            }
        } else {
            InfinispanCache.get().<UUID, Type>getCache(IndexDefinition.UUIDCACHE).addListener(new CacheLogListener(
                            IndexDefinition.LOG));
        }
    }
692774
public static void initialize(final Class<?> _class)
        throws CacheReloadException
    {
        if (InfinispanCache.get().exists(Type.UUIDCACHE)) {
            InfinispanCache.get().<UUID, Type>getCache(Type.UUIDCACHE).clear();
        } else {
            InfinispanCache.get().<UUID, Type>getCache(Type.UUIDCACHE).addListener(new CacheLogListener(Type.LOG));
        }
        if (InfinispanCache.get().exists(Type.IDCACHE)) {
            InfinispanCache.get().<Long, Type>getCache(Type.IDCACHE).clear();
        } else {
            InfinispanCache.get().<Long, Type>getCache(Type.IDCACHE).addListener(new CacheLogListener(Type.LOG));
        }
        if (InfinispanCache.get().exists(Type.NAMECACHE)) {
            InfinispanCache.get().<String, Type>getCache(Type.NAMECACHE).clear();
        } else {
            InfinispanCache.get().<String, Type>getCache(Type.NAMECACHE).addListener(new CacheLogListener(Type.LOG));
        }
        if (InfinispanCache.get().exists(EnumType.CACHE)) {
            InfinispanCache.get().getCache(EnumType.CACHE).clear();
        }
        QueryCache.initialize();
    }