I'm looking for some suggestions on caching DM models (primarily in
memcached or redis). I have some models that are rather heavy on
relationships and some requests that traverse a large number of these.
I'd like to stash the model in memcached but due to DM's lazy loading
this seems to only save the query to fetch the object itself, all the
relationships are still queried dynamically. This may be desirable for
some applications which higher rates of change in the relationships
but it would be nice to be able to eager load the object with its
relationships and then cache the whole bundle.

Has anyone come up with a good strategy or plugin for doing this? The
only alternative I can think of at the moment is to just use the DM
models to populate some higher level objects which I can then cache,
this may be the best in the long term but I can still think of cases
where a lightweight model cache may be useful.

--

You received this message because you are subscribed to the Google Groups 
"DataMapper" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/datamapper?hl=en.


Reply via email to