sinatra application - how to store very large cahe data? in sessions?
Hello,
I use Ruby with Sinatra in my application and I need to store a big data (exceeding 4K) in my session or somewhere secude on the server because I do some API calls and I refer to that data very often and that's why I need it stored.
The problem is Sinatra dropped my session content because of exceeding 4K data:
[B]Warning! Rack::Session::Cookie data size exceeds 4K. Content dropped.[/B]
I don't know what to do:
- is there a way of enlarging the maximum capacity of session cookie? although I don't want to get huge cookies.
- is there another way of keeping the data fast and secure maybe on THE SERVER instead of cookie-based session? (sqlite? how?)
I hope I have beed clear on my post. Thanks for reading, I would really apreciate any help... it is very critical to me.
Related Article: Error in rails application deployment?
is a Ruby discussion thread by rubyonrails that has 1 reply, was last updated 3 years ago and has been tagged with the keywords: agile, development.
Clawsy
Posting Whiz in Training
225 posts since Feb 2008
Reputation Points: 11
Solved Threads: 7
Skill Endorsements: 0
Got it finally:
Do not write:
enable :sessions
Write:
use Rack::Session::Pool
instead.
:)
Clawsy
Posting Whiz in Training
225 posts since Feb 2008
Reputation Points: 11
Solved Threads: 7
Skill Endorsements: 0
Question Self-Answered as of 2 Years Ago