Skip to content

Instantly share code, notes, and snippets.

@rubychan
Created May 3, 2010 00:26
Show Gist options
  • Save rubychan/387584 to your computer and use it in GitHub Desktop.
Save rubychan/387584 to your computer and use it in GitHub Desktop.
@@ -140,7 +140,7 @@ module ActiveSupport
private
def thread_local_key
- @thread_local_key ||= "#{self.class.name.underscore}_local_cache_#{self.object_id}".gsub("/", "_").to_sym
+ @thread_local_key ||= "#{self.class.name.underscore}_local_cache_#{object_id}".gsub(/[\/-]/, '_').to_sym
end
def local_cache
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment