Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add ability for clientMode to be set from Spring bean resource injection #6

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

rappleg
Copy link

@rappleg rappleg commented Oct 20, 2017

Would like the ability to be able to set the clientMode to Static from Grails (Spring) dependency injection to be able to do something like the following when injecting the memcachedClient resource.

memcachedClient(MemcachedClientFactoryBean) {
	clientMode = ClientMode.Static // This is currently being ignored
	protocol = "BINARY"
	opTimeout = 1000
	timeoutExceptionThreshold = 1998
	hashAlg = DefaultHashAlgorithm.KETAMA_HASH
	locatorType = "CONSISTENT"
	failureMode = "Cancel"
	useNagleAlgorithm = false
	transcoder(net.spy.memcached.transcoders.SerializingTranscoder) {
		compressionThreshold = 1024
	}
}

@kklopfenstein
Copy link

kklopfenstein commented Mar 15, 2018

I've had to extend MemcachedClientFactoryBean locally to achieve this. This seems like a pretty common usecase if you want to use a standard memcached server for local development.

Copy link

@brunocleite brunocleite left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Perfect, needed the same here

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants