I’m trying to use http://www.flexablecoder.com/blog/index.cfm/memcached client.
All works ok but for each cfm call, Coldfusion always open a new connection to the memcached server, not reusing an old one.
Is there a way to reuse the memcached connections?
You need to initialize a singleton object, ie, only one instance of the memcached object. In application.cfc you can initialize in onApplicationStart method:
If using application.cfm, just check the instance before setting it: