Skip to content

Instantly share code, notes, and snippets.

@ogasyo
ogasyo / init-ktserver
Created September 13, 2011 10:00
KyotoTycoon init script
cat > /etc/init.d/ktserver <<\_EOF_
#!/bin/sh -e
### BEGIN INIT INFO
# Provides: ktserver
# Required-Start: $syslog
# Required-Stop: $syslog
# Should-Start: $local_fs
# Should-Stop: $local_fs
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
@ogasyo
ogasyo / legacy_mem_cache_store.rb
Created August 2, 2013 08:49
Rails4 で dalli が標準の MemcacheClient になっちゃった対策。
# Add legacy memcache session store for using KyotoTycoon with memcached protocol.
# Sourced from Rails 3.2
# => https://github.com/rails/rails/blob/3-2-stable/actionpack/lib/action_dispatch/middleware/session/mem_cache_store.rb
#
require 'action_dispatch/middleware/session/abstract_store'
require 'rack/session/memcache'
module ActionDispatch
module Session
class LegacyMemCacheStore < Rack::Session::Memcache