public
Rubygem
Fork of fiveruns/memcache-client
Description: Seattle.rb's memcache-client 1.5.0 with logging
Clone URL: git://github.com/sudothinker/memcache-client.git
Logging key/value pairs which are greater than 800kb in info mode
sudothinker (author)
Wed Jul 09 12:37:19 -0700 2008
commit  577e9b707d386c9c0bf8daacdda5de34097a75c8
tree    f4f4589491d06bc80b014724a33ec6445bf12404
parent  07b47ced5923df65f3e0926bb19993b00f7df60c
...
300
301
302
 
 
303
304
305
...
329
330
331
 
 
332
333
334
...
300
301
302
303
304
305
306
307
...
331
332
333
334
335
336
337
338
0
@@ -300,6 +300,8 @@ class MemCache
0
     value = Marshal.dump value unless raw
0
     command = "set #{cache_key} 0 #{expiry} #{value.size}\r\n#{value}\r\n"
0
 
0
+ ActiveRecord::Base.logger.info "Setting key/value #{key}\n#{value}" if value.to_s.size > 800000
0
+
0
     begin
0
       @mutex.lock if @multithread
0
       socket.write command
0
@@ -329,6 +331,8 @@ class MemCache
0
     value = Marshal.dump value unless raw
0
     command = "add #{cache_key} 0 #{expiry} #{value.size}\r\n#{value}\r\n"
0
 
0
+ ActiveRecord::Base.logger.info "Adding key/value #{key}\n#{value}" if value.to_s.size > 800000
0
+
0
     begin
0
       @mutex.lock if @multithread
0
       socket.write command

Comments

    No one has commented yet.