Ruby on Rails | Screencasts | Download | Documentation | Weblog | Community | Source

Ticket #5757 (closed defect: fixed)

Opened 4 years ago

Last modified 4 years ago

[PATCH] cache nils on has_one associations

Reported by: mschoen Assigned to: David
Priority: normal Milestone:
Component: ActiveRecord Version:
Severity: normal Keywords:
Cc:

Description

This patch allows nils to be cached on has_one associations, for dramatic performance improvements (when you've got lots of nils). Includes a unit test.

Attachments

has_one_cache.patch (2.7 kB) - added by mschoen on 08/08/06 07:25:49.

Change History

08/08/06 07:25:49 changed by mschoen

  • attachment has_one_cache.patch added.

08/08/06 17:00:04 changed by rick

  • status changed from new to closed.
  • resolution set to fixed.

(In [4721]) Cache nil results for has_one associations so multiple calls don't call the database. Closes #5757. [Michael A. Schoen]