2 Getting Started - Reference Documentation
Authors: Burt Beckwith
Version: 1.0.3.2
2 Getting Started
The first step is to install the plugin:
grails install-plugin memcached
grails.plugin.memcached.hosts = 'localhost:11211'
grails.plugin.memcached.hosts = 'memcached1.yourcompany.com:11211 memcached2.yourcompany.com:11211 memcached5.yourcompany.com:11211'
grails.plugin.memcached.hosts = '10.10.0.1:11211 10.10.0.2:11211 10.10.0.5:11211'
grails.plugin.memcached.username = 'the username' grails.plugin.memcached.password = 'the password'
DataSource.groovy changes
You can change thehibernate.cache.provider_class
property from its default value ('org.hibernate.cache.EhCacheProvider'
) in DataSource.groovy if you want, but its value will be ignored and reconfigured to be 'com.googlecode.hibernate.memcached.MemcachedCacheProvider'
. One reason to edit the file is to make it more clear that you're using memcached, but it's not required.