Skip to content

Instantly share code, notes, and snippets.

View kyleschmolze's full-sized avatar

Kyle Schmolze kyleschmolze

View GitHub Profile
# Another attempt using the built in Rails.cache.fetch (better serialization/deserialization)
class ActiveSupport::Cache::DalliStore
def fast_fetch(name, options=nil)
options ||= {}
name = expanded_key name
dupe_name = name+'_dupe'
if block_given?
unless options[:force]