Closed wong2 closed 8 years ago
Redis only accepts string or numeric values, so the only data we can cache is plain json.
@rfink what about build instances with the cached plain json?
Perhaps with Model.build
?
I've actually considered something similar, but the issue goes back to #24, where the module doesn't have a mechanism for invalidating a cached object on insert/update, so the model that is created with Model.build could be out of sync with the database. Model.build could be called by the caller, which would solve this particular issue.
seems the query methods are returning plain js objects instead of model instances? why?