Answer the question
In order to leave comments, you need to log in
How to cache DataMapper models?
DataMapper is far from a marginal ORM - in practice, I was puzzled by reducing the load on the database.
How do you implement model caching?
Marshal the whole object and memkesh?
Rip out the final Hash with data and into Redis?
Or from the model to JSON and to files on tmpfs?
* Run-in solutions ala cache_money (ActiveRecord) not found.
Answer the question
In order to leave comments, you need to log in
In files it is not necessary - I/O can rise. I would use Redis. Do marshaling or to_json is a good question. In general, the length of the data is almost the same, so it's silly to compare the "heaviness" of the data. I think if you do not need to perform any operations with an object or relations, then marshaling is not needed, hashes / json will do.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question