Skip to content

Instantly share code, notes, and snippets.

@patricksrobertson
Last active December 17, 2015 01:28
Show Gist options
  • Save patricksrobertson/5528196 to your computer and use it in GitHub Desktop.
Save patricksrobertson/5528196 to your computer and use it in GitHub Desktop.
Why I hate the anti-runtime extension topic with DCI.
class SomeController < ApplicationController
def create
patient = Patient.new(params[:patient]) #METHOD CACHE DESTROYED ABOUT A MILLION TIMES
patient.extend RegisteringNewPatient #METHOD CACHE DESTROYED ONCE, 0.00001 seconds consumed
patient.save #METHOD CACHE DESTROYED ANOTHER MILLION TIMES
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment