我发现一些线程说这是可行的,但没有找到具体的说明或配置信息。
我也想从 Beanstalk 执行此操作:应用程序应该部署到 beanstalk,并使用将 hibernate 指向 elasticache 实例的配置。
是的,我们能够使用二级缓存配置 hibernate.. 但不能使用 beanstalk.. 这段代码应该可以帮助你。
<props>
<prop key="hibernate.dialect">org.hibernate.dialect.MySQLDialect</prop>
<prop key="hibernate.show_sql">false</prop>
<prop key="hibernate.format_sql">false</prop>
<prop key="hibernate.generate_statistics">true</prop>
<prop key="hibernate.cache.use_structured_entries">true</prop>
<!-- prop key="hibernate.hbm2ddl.auto" >update</prop -->
<prop key="hibernate.jdbc.batch_size">100</prop>
<prop key="hibernate.cache.provider_class">com.googlecode.hibernate.memcached.MemcachedCacheProvider
</prop>
<!-- Cache disabled -->
<prop key="hibernate.cache.use_query_cache">true</prop>
<prop key="hibernate.cache.use_second_level_cache">true</prop>
<prop key="hibernate.memcached.servers"><elasticachehostname>:11211</prop>
<prop key="hibernate.memcached.cacheTimeSeconds">300</prop>
<prop key="hibernate.memcached.connectionFactory">DefaultConnectionFactory</prop>
<prop key="hibernate.memcached.clearSupported">false</prop>
</props>
你需要休眠内存缓存 http://code.google.com/p/hibernate-memcached/wiki/Configuration罐子也是如此
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)