org.rythmengine.cache.CacheServiceFactory Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of rythm-engine Show documentation
Show all versions of rythm-engine Show documentation
A strong typed high performance Java Template engine with .Net Razor like syntax
package org.rythmengine.cache;
import org.rythmengine.extension.ICacheService;
import org.rythmengine.extension.ICacheServiceFactory;
/**
* Created with IntelliJ IDEA.
* User: luog
* Date: 2/12/13
* Time: 8:46 AM
* To change this template use File | Settings | File Templates.
*/
public enum CacheServiceFactory implements ICacheServiceFactory {
INSTANCE;
@Override
public ICacheService get() {
try {
Class.forName("net.sf.ehcache.Cache");
Class factoryClass = (Class)Class.forName("org.rythmengine.cache.EhCacheServiceFactory");
ICacheServiceFactory fact = factoryClass.newInstance();
return fact.get();
} catch (Exception e) {
// ignore
}
return SimpleCacheService.INSTANCE;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy