Commit 0f44adf2 by Rocky Duan

output message when cache hit

parent 818fa573
......@@ -93,7 +93,10 @@ class CommentThread < Content
if CommentService.config[:cache_enabled]
memcached_key = "threads_search_#{params.merge(options).hash}"
results = Sinatra::Application.cache.get(memcached_key)
return results if results
if results
puts "cache hit"
return results
end
puts "cache miss"
end
search = Tire::Search::Search.new 'comment_threads'
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment