I have a Sinatra app I ported from plain old window ruby and mongrel
to jruby + glassfish. Porting was almost entirely just installing the
new software (though I was using rest-client and it doesn't work at
all and rack-cache isn't working which is why I'm here).
It is working like a champ if I disable rack-cache. If I enable it I
get exceptions in the write call and I think it is because for some
reason in the new environment rack-cache.cache_key is set wrong. I
have key's that look like this: '://localhost/testpackage?'. Seems
like that is the request.url, not the request.path_info, and maybe it
should be using request.path_info?
I see some code in the gem suggesting I can somehow set :cache_key.
How might I do this and where?
It appears the problem is that in jruby+glassfish under Windows,
IOError is thrown instead of ENOENT. Since rack-cache expects this
exception and codes in the rescue of read/write/purge, these
operations will fail.