-
Notifications
You must be signed in to change notification settings - Fork 93
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
improve cookie caching code to not depend on local storage #105
Comments
We use
However HTTPClient's CookieManager code is set up to use the filesystem store (https://github.com/nahi/httpclient/blob/e11c7805c07d13989583aca91d9232231aafcd1e/lib/httpclient/cookie.rb#L22 would be unnecessary with the sqlite store, although I don't think it will necessarily break) and it doesn't expose the My take is that we'd need to write a custom CookieManager (which we can set on the HTTPClient object https://github.com/nahi/httpclient/blob/master/lib/httpclient.rb#L312) which instantiates a CookieJar with an arbitrary store (set by options). There is another snag that |
I was incorrect about that last paragraph. They handle passing in symbols or classes as the implementation (https://github.com/sparklemotion/http-cookie/blob/master/lib/http/cookie_jar.rb#L42-L47). |
Right now the cookie caching code assumes the cookie storage is on a local disk. This works fine if you run all your rets interactions on a single machine or have some sort of shared filesystem, but it's not terribly flexible.
I'd prefer a caching mechanism that accepts an object that responds to
read(name)
andwrite(name)
or something similar, then we can write plugins for this for nearly any storage system and simplify the process of running rets clients on multiple machines.The text was updated successfully, but these errors were encountered: