Skip to content

Instantly share code, notes, and snippets.

@shanbhardwaj
Created February 17, 2010 19:56
Show Gist options
  • Save shanbhardwaj/306961 to your computer and use it in GitHub Desktop.
Save shanbhardwaj/306961 to your computer and use it in GitHub Desktop.
GENERAL_CACHE_SERVERS = ["localhost:11212"]
GENERAL_CACHE_OPTIONS = {:untaint => true}
SESSION_CACHE_SERVERS = ["localhost:11211"]
SESSION_CACHE_OPTIONS = { :prefix_key => '_gigzee_session' }
SESSION_MEMCACHE_CLIENT = Memcached.new(SESSION_CACHE_SERVERS, SESSION_CACHE_OPTIONS)
config.action_controller.perform_caching = true
config.cache_store = :libmemcached_store, GENERAL_CACHE_SERVERS #, GENERAL_CACHE_OPTIONS
# config.cache_store = :mem_cache_store, "localhost:11212"
config.action_controller.session_store = :libmemcached_store
config.action_controller.session = {
:cache => SESSION_MEMCACHE_CLIENT,
:secret => '8536f7f46b1ae0ac1a4b2b564fc33b800a8c6e76da61aec7f7e0509cbac4b50a4dc2a76fa0ba3fe87d4201cf70ef0d4b4f1e360c68f1e3c34bdf3074d62c32ce',
:expires_after => 86400
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment