Created
February 20, 2009 16:15
-
-
Save genki/67536 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class LoggingMemcachedStore < Merb::Cache::MemcachedStore | |
include Extlib::Hook | |
before :read do |key, params| | |
if exists?(key, params) | |
Merb.logger.debug "Cache Hit: #{key}" | |
else | |
Merb.logger.debug "Cache Miss: #{key}" | |
end | |
end | |
before :write do |key, data, params, conds| | |
Merb.logger.debug "Cache Write: #{key}" | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment