If I want to reload an AR association, I can call "reload" on it.
department.employees.reload or what have you.
But what I want to do is uncache it, but not actually take a trip to the
db. I want to mark it so NEXT time it's accessed, it will take a trip to
the db (if it is ever accessed again). I know it's become unreliable,
but I don't want to spend the time reloading it now, I want to just mark
it as uncached. Lazily reload it.
If I want to reload an AR association, I can call "reload" on it.
department.employees.reload or what have you.
But what I want to do is uncache it, but not actually take a trip to
the
db. I want to mark it so NEXT time it's accessed, it will take a
trip to
the db (if it is ever accessed again). I know it's become unreliable,
but I don't want to spend the time reloading it now, I want to just
mark
it as uncached. Lazily reload it.
If it's an association collection, then department.employees.reset
should do the trick. For has_one/belongs_to you need to fiddle with
innards.