Cache the response
alaibe opened this issue · comments
Hi
Maybe it is present but I could not find it.
I am looking for a way of caching the resources.
Currently I am using cache_action and generate a key based on the updated_at of the resource.
However I am adding the way of include
nested resource and the generated cache should be per resource and not action.
So is there a method available to produce such result?
Thx
Strictly speaking, this shouldn't be Roar's job but the HTTP endpoint's duty! But now that you say you want to cache fragments, it - damnit - becomes our responsibility. 😬
There's some issues open with this requirement on the Representable repository. We could work out something. You theoretically could do that already using Representable 3.0's new pipelining. Let me think a few moments about this...
I think you are talking about this one: trailblazer/representable#168
About the pipeline, is there any doc available?
So far, only this: http://nicksda.apotomo.de/2015/11/representable-2-4-how-functional-programming-speeds-up-rendering-and-parsing/
Didn't have time to properly document it, yet. I also didn't have time to think about how to use the pipeline for this, yet. 😬