It is better to initialize a empty hash in the `initialize` of Relation and use the offset as the key to memoize it.

Since we are adding an internal variable to cache the value we have to update `reset` method https://github.com/rails/rails/blob/080fc9cad39a98b6973cd7a7106f1bcb10d3ad02/activerecord/lib/active_record/relation.rb#L497