EHCache vs Memcached

Hi,
today I’m trying to migrate the Lucee 5.3.3.62 cache from EHCache to memcached 1.5.6. I would like to use memcached because I am already using it for the ngx_pagespeed cache.

From some tests I noticed that EHCache is much faster than memcached!

A cached query with ehcache is retrieved in 30ms and with memcached 1200ms! Why is this difference so huge?

Thanks,
Ivan

I use memcached on a different server and it is extremely fast, faster than calling mysql. Without seeing any code or setup specs it is impossible to advise what is going wrong.