On Windows, calling File#size fails with an Unknown error (20047). This workaround uses File#lstat instead.
open-uri modifies the behavior of global open(), which is undesirable in some situations. Do not require it unless it is going to be used.
It raised 'premature end of regular expression' if debug_dev is set, $KCODE is not 'n' and on 1.8. Closes #74.
Change @sess_pool from an Array to a Hash with Site as a key. Each value is an Array of sessions. This should improve cache access performance if multiple sites are in cache. In addition to the change, do scrub the cache every @keep_alive_timeout seconds. This also should improve cache access performance since it was scrubbing the cache every time. See #69
MRU is more server friendly than LRU because it reduces number of cached sessions when a number of requests drops after an usaage spike. Closes #68. With reusing sessions in LRU order, all sessions are equally checked if it's closed or not, as far as there's a request to the same site. With reusing sessions in MRU order, old cold sessions are kept in cache long time even if there's a request to the same site. To avoid this leakage, this commit adds keep_alive_timeout property and let SessionManager scrub all sessions with checking the timeout for each session. When the session expires against the last used time, it's closed and collected. keep_alive_timeout is 15[sec] by default. The value is from the default value for KeepAliveTimeout of Apache httpd 2. This change is related to #56.