Skip to content

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

Open
rappleg wants to merge 1 commit into
awslabs:masterfrom
rappleg:AddClientModeToMemcachedClientFactoryBean
Open

Add ability for clientMode to be set from Spring bean resource injection#6
rappleg wants to merge 1 commit into
awslabs:masterfrom
rappleg:AddClientModeToMemcachedClientFactoryBean

Conversation

@rappleg

@rappleg rappleg commented Oct 20, 2017

Copy link
Copy Markdown

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

kklopfenstein commented Mar 15, 2018

Copy link
Copy Markdown

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.

@brunocleite brunocleite left a comment

Copy link
Copy Markdown

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