-
Notifications
You must be signed in to change notification settings - Fork 29
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
memcached #25
Comments
You have to use the ActiveSupport cache interface, see this post for more On Mon, Mar 21, 2011 at 12:06 PM, rickthomasjr <
|
Thanks for the tip. When I try this, require 'simple_record' I get the same error. Also, if I remove the "localhost" and the options array from the DalliStore
Do you have any reason to believe this won't work with Sinatra? Thanks for your attention. On Tue, Mar 22, 2011 at 1:33 AM, treeder <
|
Also, FWIW, local_cache worked fine. Unfortunately that's not appropriate On Tue, Mar 22, 2011 at 8:35 AM, Rick Thomas [email protected] wrote:
|
Any more thoughts on this issue? |
You get the undefined method `write' error? Can you post backtrace? |
In the merged_options method, options is nil: undefined method `merge' for nil:NilClass
/Users/rickthomas/.rvm/gems/ruby-1.9.2-p136@sinatra/gems/activesupport-3.0.5/lib/active_support/cache.rb in merged_options
/Users/rickthomas/.rvm/gems/ruby-1.9.2-p136@sinatra/gems/activesupport-3.0.5/lib/active_support/cache.rb in write
/Users/rickthomas/.rvm/gems/ruby-1.9.2-p136@sinatra/gems/dalli-1.0.3/lib/active_support/cache/dalli_store23.rb in write
/Users/rickthomas/.rvm/gems/ruby-1.9.2-p136@sinatra/gems/simple_record-2.1.3/lib/simple_record.rb in cache_results
/Users/rickthomas/.rvm/gems/ruby-1.9.2-p136@sinatra/gems/simple_record-2.1.3/lib/simple_record.rb in save_super
/Users/rickthomas/.rvm/gems/ruby-1.9.2-p136@sinatra/gems/simple_record-2.1.3/lib/simple_record.rb in do_actual_save
/Users/rickthomas/.rvm/gems/ruby-1.9.2-p136@sinatra/gems/simple_record-2.1.3/lib/simple_record.rb in block in update
/Users/rickthomas/.rvm/gems/ruby-1.9.2-p136@sinatra/gems/activesupport-3.0.5/lib/active_support/callbacks.rb in _run_update_callbacks /Users/rickthomas/.rvm/gems/ruby-1.9.2-p136@sinatra/gems/simple_record-2.1.3/lib/simple_record.rb in update
/Users/rickthomas/.rvm/gems/ruby-1.9.2-p136@sinatra/gems/simple_record-2.1.3/lib/simple_record.rb in block in create_or_update
/Users/rickthomas/.rvm/gems/ruby-1.9.2-p136@sinatra/gems/activesupport-3.0.5/lib/active_support/callbacks.rb in _run_save_callbacks
/Users/rickthomas/.rvm/gems/ruby-1.9.2-p136@sinatra/gems/simple_record-2.1.3/lib/simple_record.rb in create_or_update
/Users/rickthomas/.rvm/gems/ruby-1.9.2-p136@sinatra/gems/simple_record-2.1.3/lib/simple_record.rb in save
/Users/rickthomas/Projects/goldshark/goldshark.rb in block in <top (required)>
|
If dalli won't work, is there another memcached client I might consider? Am I the only one having this problem? |
I cannot figure out how to get caching working with either memcached or dalli. This code:
store = :memcache_store, 'localhost', { :namespace => 'my_program', :expires_in => 1.day, :compress => true, :compress_threshold => 64*1024 }
SimpleRecord::Base.cache_store = store
results in undefined method `write' for #Array:0x00000101b80540
I'm working in Sinatra.
The text was updated successfully, but these errors were encountered: