diff options
author | Eric Wong <e@80x24.org> | 2016-08-02 19:53:25 +0000 |
---|---|---|
committer | Eric Wong <e@80x24.org> | 2016-08-02 19:58:51 +0000 |
commit | 0ec6c3af48fa396c3182f7c6f6b92ba0d835c7ed (patch) | |
tree | 00b36475dd704224c4968d940fe2c82c615feefa | |
parent | e138d022e98b66c535f9bbdb230e4b5087fd8f33 (diff) | |
download | yahns-0ec6c3af48fa396c3182f7c6f6b92ba0d835c7ed.tar.gz |
Sometimes, one process is all you need :> Fwiw, I am also experimenting with the following in my yahns.conf.rb file: scache_stats = lambda do |env| s = ctx.session_cache_stats.inspect << "\n" [200, [%W(Content-Length #{s.size}), %w(Content-Type text/plain)], [s]] end app(:rack, scache_stats, preload: true) do listen "unix:/tmp/yahns-scache.#$$.sock" end Which allows me to get stats based on the master PID (not worker): printf 'GET / HTTP/1.0\r\n\r\n' | socat - UNIX:/tmp/yahns-scache.$PID.sock
-rw-r--r-- | Documentation/yahns_config.pod | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/Documentation/yahns_config.pod b/Documentation/yahns_config.pod index d8c6801..0182acf 100644 --- a/Documentation/yahns_config.pod +++ b/Documentation/yahns_config.pod @@ -451,6 +451,9 @@ An example which seems to work is: # but disable client certificate verification as it is rare: ssl_ctx.set_params(verify_mode: OpenSSL::SSL::VERIFY_NONE) + # Built-in session cache (only works if worker_processes is nil or 1) + ssl_ctx.session_cache_mode = OpenSSL::SSL::SSLContext::SESSION_CACHE_SERVER + app(:rack, "/path/to/my/app/config.ru") do listen 443, ssl_ctx: ssl_ctx end |