Skip to content

Commit

Permalink
Merge pull request petergoldstein#360 from locriani/value-too-large
Browse files Browse the repository at this point in the history
Warn on VALUE_TOO_LARGE
  • Loading branch information
mperham committed May 7, 2013
2 parents 8561304 + 7513b7f commit b0677db
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion lib/dalli/server.rb
Original file line number Diff line number Diff line change
Expand Up @@ -452,7 +452,12 @@ def cas_response
KV_HEADER = '@2n@6nN'

def under_max_value_size?(value)
value.bytesize <= @options[:value_max_bytes]
if value.bytesize <= @options[:value_max_bytes]
true
else
Dalli.logger.warn "Value over max size"
false
end
end

def generic_response(unpack=false)
Expand Down

0 comments on commit b0677db

Please sign in to comment.