Initializes the caches.<p>

@param cacheSize the cache size
425993
protected void initCaches(int cacheSize) {

        m_offlineJsps = CmsMemoryMonitor.createLRUCacheMap(cacheSize);
        m_onlineJsps = CmsMemoryMonitor.createLRUCacheMap(cacheSize);
    }
1300315
private static void initCaches() {

        if (m_cacheTemporary == null) {
            m_cacheTemporary = CmsMemoryMonitor.createLRUCacheMap(1024);

            m_cachePermanent = new ConcurrentHashMap<String, byte[]>(32);

            m_cacheContentDefinitions = CmsMemoryMonitor.createLRUCacheMap(CONTENT_DEFINITION_CACHE_SIZE);
        }
        if (OpenCms.getRunLevel() > OpenCms.RUNLEVEL_1_CORE_OBJECT) {
            if ((OpenCms.getMemoryMonitor() != null)
                && !OpenCms.getMemoryMonitor().isMonitoring(CmsXmlEntityResolver.class.getName() + ".cacheTemporary")) {
                // reinitialize the caches after the memory monitor is set up
                Map<String, byte[]> cacheTemporary = CmsMemoryMonitor.createLRUCacheMap(128);
                cacheTemporary.putAll(m_cacheTemporary);
                m_cacheTemporary = cacheTemporary;
                OpenCms.getMemoryMonitor().register(
                    CmsXmlEntityResolver.class.getName() + ".cacheTemporary",
                    cacheTemporary);

                Map<String, byte[]> cachePermanent = new ConcurrentHashMap<String, byte[]>(32);
                cachePermanent.putAll(m_cachePermanent);
                m_cachePermanent = cachePermanent;
                OpenCms.getMemoryMonitor().register(
                    CmsXmlEntityResolver.class.getName() + ".cachePermanent",
                    cachePermanent);

                Map<String, CmsXmlContentDefinition> cacheContentDefinitions = CmsMemoryMonitor.createLRUCacheMap(
                    CONTENT_DEFINITION_CACHE_SIZE);
                cacheContentDefinitions.putAll(m_cacheContentDefinitions);
                m_cacheContentDefinitions = cacheContentDefinitions;
                OpenCms.getMemoryMonitor().register(
                    CmsXmlEntityResolver.class.getName() + ".cacheContentDefinitions",
                    cacheContentDefinitions);
            }
        }
    }
361128
@SuppressWarnings("unchecked")
  protected final void initialize(int maxSize) {
    size = 0;
    int heapSize = maxSize + 1;
    heap = (T[]) new Object[heapSize];
    this.maxSize = maxSize;
  }
1319364
protected void initCache(ClassTraversal traversal) {
    if (m_CacheNames == null)
      m_CacheNames = new HashMap<>();
    if (m_CacheClasses == null)
      m_CacheClasses = new HashMap<>();
    if (m_BlackListed == null)
      m_BlackListed = new HashSet<>();
    if (m_Cache == null)
      m_Cache = newClassCache(traversal);
  }
1269720
public static void initialize()
        throws CacheReloadException
    {
        Context.getDbType().initialize(AbstractDataModelObject.class);
        AttributeType.initialize(AbstractDataModelObject.class);
        SQLTable.initialize(AbstractDataModelObject.class);
        Type.initialize(AbstractDataModelObject.class);
        Dimension.initialize(AbstractDataModelObject.class);
        Attribute.initialize(AbstractDataModelObject.class);
        Status.initialize(AbstractDataModelObject.class);
    }
287073
private static Cache<String, Map<String, List<Object>>> initializeCache(final CachingPrincipalAttributesRepository repository) {
        val unit = TimeUnit.valueOf(StringUtils.defaultString(repository.getTimeUnit(), DEFAULT_CACHE_EXPIRATION_UNIT));
        return Caffeine.newBuilder()
            .initialCapacity(DEFAULT_MAXIMUM_CACHE_SIZE)
            .maximumSize(DEFAULT_MAXIMUM_CACHE_SIZE)
            .expireAfterWrite(repository.getExpiration(), unit)
            .build(s -> new TreeMap<>(String.CASE_INSENSITIVE_ORDER));
    }
486906
public void resize(int maxCacheSize) {
		setMaxCacheSize(maxCacheSize);
		for (FeatureCache cache : tableCache.values()) {
			cache.resize(maxCacheSize);
		}
	}
1319016
public void init(Marshaller marshaller, OperationsFactory operationsFactory,
                    int estimateKeySize, int estimateValueSize, int batchSize) {
      this.defaultMarshaller = marshaller;
      this.operationsFactory = operationsFactory;
      this.estimateKeySize = estimateKeySize;
      this.estimateValueSize = estimateValueSize;
      this.batchSize = batchSize;
      this.dataFormat = defaultDataFormat;
   }
709033
private int getBeanIdCacheSize(int cacheSize)
    {
        int beanIdCacheSize = cacheSize;
        if (beanIdCacheSize < (Integer.MAX_VALUE / 2))
            beanIdCacheSize = beanIdCacheSize * 2;
        else
            beanIdCacheSize = Integer.MAX_VALUE;

        return beanIdCacheSize;
    }
1026
public CacheManagerBuilder<T> withDefaultSizeOfMaxObjectSize(long size, MemoryUnit unit) {
    DefaultSizeOfEngineProviderConfiguration configuration = configBuilder.findServiceByClass(DefaultSizeOfEngineProviderConfiguration.class);
    if (configuration == null) {
      return new CacheManagerBuilder<>(this, configBuilder.addService(new DefaultSizeOfEngineProviderConfiguration(size, unit, DEFAULT_OBJECT_GRAPH_SIZE)));
    } else {
      ConfigurationBuilder builder = configBuilder.removeService(configuration);
      return new CacheManagerBuilder<>(this, builder.addService(new DefaultSizeOfEngineProviderConfiguration(size, unit, configuration
        .getMaxObjectGraphSize())));
    }
  }
134611
public void setCacheClusters(java.util.Collection<CacheCluster> cacheClusters) {
        if (cacheClusters == null) {
            this.cacheClusters = null;
            return;
        }

        this.cacheClusters = new com.amazonaws.internal.SdkInternalList<CacheCluster>(cacheClusters);
    }
418154
public void initialize() {
    Enumeration		enm;
    String		superclass;
    String[]		packages;

    try {
      m_CacheNames   = new HashMap<>();
      m_ListNames    = new HashMap<>();
      m_CacheClasses = new HashMap<>();
      m_ListClasses  = new HashMap<>();

      enm = m_Packages.propertyNames();
      while (enm.hasMoreElements()) {
        superclass = (String) enm.nextElement();
        packages   = m_Packages.getProperty(superclass).replaceAll(" ", "").split(",");
        addHierarchy(superclass, packages);
      }
    }
    catch (Exception e) {
      getLogger().log(Level.SEVERE, "Failed to determine packages/classes:", e);
      m_Packages = new Properties();
    }
  }
828542
private void init()
    {
        this.container = InfinispanCache.findCacheContainer();
        if (this.container == null) {
            try {
                this.container = new DefaultCacheManager(this.getClass().getResourceAsStream(
                                "/org/efaps/util/cache/infinispan-config.xml"));
                if (this.container instanceof EmbeddedCacheManager) {
                    this.container.addListener(new CacheLogListener(InfinispanCache.LOG));
                }
                InfinispanCache.bindCacheContainer(this.container);
                final Cache<String, Integer> cache = this.container
                                .<String, Integer>getCache(InfinispanCache.COUNTERCACHE);
                cache.put(InfinispanCache.COUNTERCACHE, 1);
            } catch (final FactoryConfigurationError e) {
                InfinispanCache.LOG.error("FactoryConfigurationError", e);
            } catch (final IOException e) {
                InfinispanCache.LOG.error("IOException", e);
            }
        } else {
            final Cache<String, Integer> cache = this.container
                            .<String, Integer>getCache(InfinispanCache.COUNTERCACHE);
            Integer count = cache.get(InfinispanCache.COUNTERCACHE);
            if (count == null) {
                count = 1;
            } else {
                count = count + 1;
            }
            cache.put(InfinispanCache.COUNTERCACHE, count);
        }
    }
137816
public static void setCacheSize(int size) {
        if (size > 3276700) size = 3276700;
        if (size <= byteCacheSize) return;
        byte[][] tmpCache = new byte[size][];
        System.arraycopy(byteCache, 0, tmpCache, 0, byteCacheSize);
        byteCache = tmpCache;
        byteCacheSize = size;
    }
795388
public void initialize(NewRelicCache cache)
    {
        String apiKey = cache.getApiKey();
        if(apiKey == null)
            throw new IllegalArgumentException("null API key");

        logger.info("Initialising the clients");

        initialized = false;
        if(cache.isAlertsEnabled())
        {
            apiClient = NewRelicApi.builder().apiKey(apiKey).build();
            infraApiClient = NewRelicInfraApi.builder().apiKey(apiKey).build();
            syntheticsApiClient = NewRelicSyntheticsApi.builder().apiKey(apiKey).build();
        }

        logger.info("Initialised the clients");

        initialized = true;
    }
459042
function init(){
    if(!cacheServiceConfig) {
      cacheServiceConfig = {};
    }
    self.nameSpace = cacheServiceConfig.nameSpace || '';
    self.verbose = (typeof cacheServiceConfig.verbose === 'boolean') ? cacheServiceConfig.verbose : false;
    self.writeToVolatileCaches = (typeof cacheServiceConfig.writeToVolatileCaches === 'boolean') ? cacheServiceConfig.writeToVolatileCaches : true;
    self.caches = new CacheCollection({nameSpace: self.nameSpace, verbose: self.verbose}, cacheModules).caches;
    self.cachesLength = self.caches.length;
  }
1303565
public synchronized void initialize() {

        LOG.info("Initializing inheritance group cache: " + m_name);
        if (m_taskFuture != null) {
            // in case initialize has been called before on this object, cancel the existing task
            m_taskFuture.cancel(false);
            m_taskFuture = null;
        }
        if (m_cms.existsResource("/", CmsResourceFilter.IGNORE_EXPIRATION)) {
            try {
                List<CmsResource> resources = m_cms.readResources(
                    "/",
                    CmsResourceFilter.IGNORE_EXPIRATION.addRequireType(
                        OpenCms.getResourceManager().getResourceType(
                            CmsResourceTypeXmlContainerPage.INHERIT_CONTAINER_CONFIG_TYPE_NAME)),
                    true);
                m_state = new CmsContainerConfigurationCacheState(load(resources).values());
            } catch (Exception e) {
                LOG.error(e.getLocalizedMessage(), e);
            }
        }
        Runnable updateAction = new Runnable() {

            public void run() {

                try {
                    flushUpdates();
                } catch (Throwable e) {
                    LOG.error(e.getLocalizedMessage(), e);
                }
            }
        };
        m_taskFuture = OpenCms.getExecutor().scheduleWithFixedDelay(
            updateAction,
            UPDATE_INTERVAL_MILLIS,
            UPDATE_INTERVAL_MILLIS,
            TimeUnit.MILLISECONDS);
    }