When a new rails application is created and the session_store is
configured for memcache by:
#config/environment.rb
config.action_controller.session_store = :mem_cache_store
The session is being request twice from the memcached server. I
ran memcached with the -vv option to get a detailed transcript on
what transactions are taking place. I then created a simple Hello
World controller. When I run the action, this is what's showing on
the console.
<22 new client connection
<22 get session:f963e5b1ad3a5bd0b1d622c0b803a370
>22 sending key session:f963e5b1ad3a5bd0b1d622c0b803a370
>22 END
<22 get session:f963e5b1ad3a5bd0b1d622c0b803a370
>22 sending key session:f963e5b1ad3a5bd0b1d622c0b803a370
>22 END
<22 set session:f963e5b1ad3a5bd0b1d622c0b803a370 0 0 61
>22 STORED
<22 connection closed.
Tried putting a delay on the controller by sleeping for 10
seconds and it's showing that it's getting the key twice, wait for
10 seconds, then setting the key. I searched everywhere to find out
why it's reading the keys twice on google, the gem source code, and
on the ticketing system but no luck. It seems it's an extra read
for no reason.
This may be related to #92 [FEATURE] More efficient session handling
I'm running rails-2.1.0, memcache_client-1.5.0 on OS X Leopard.
I tried both in development mode and production mode.