All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.ligoj.bootstrap.resource.system.configuration.ConfigurationCache Maven / Gradle / Ivy

There is a newer version: 3.1.22
Show newest version
/*
 * Licensed under MIT (https://github.com/ligoj/ligoj/blob/master/LICENSE)
 */
package org.ligoj.bootstrap.resource.system.configuration;

import java.util.function.Function;

import org.ligoj.bootstrap.resource.system.cache.CacheManagerAware;
import org.springframework.stereotype.Component;

import com.hazelcast.cache.HazelcastCacheManager;
import com.hazelcast.config.CacheConfig;

/**
 * "Configuration" values cache configuration.
 */
@Component
public class ConfigurationCache implements CacheManagerAware {

	@Override
	public void onCreate(HazelcastCacheManager cacheManager, final Function> provider) {
		cacheManager.createCache("configuration", provider.apply("configuration"));
		cacheManager.createCache("hooks", provider.apply("hooks"));
	}

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy