geddy / model

Datastore-agnostic ORM in JavaScript
265 stars 55 forks source link

Rest-adapter: Instance cache lifetime #260

Closed der-On closed 9 years ago

der-On commented 9 years ago

The instance cache should have a lifetime so references to model instances get removed after a certain time to avoid memory leeks.

Maybe attach a timeout to each newly created model instance. After this timeout remove the reference. If the model instance gets updated before the timeout, renew the timeout.

mde commented 9 years ago

:+1: