Caching API Discussion

In the original 5.0 roadmap there was a discussion about implementing a caching API. Although it’s not on the current roadmap for rom5, I think discussing the public interface / implementation would be a great way to get the ball rolling on this feature. At AdHawk, ROM has been incredibly beneficial for us but we are sorely missing a nice mechanism for caching. Would love to help however I can.

@solnic what do you envision as the user facing API for this feature? Personally I believe this is the most important piece of the puzzle that has not been solved well by ActiveRecord. It always felt clunky to drop down to low-level caching and relying on cache_key to do the magic. Having a blank slate, I’m excited to hear your thoughts on a caching API, I imagine it will be an incredibly powerful selling point to using ROM.

After a quick overview of the API, we can bikeshed it a bit if neccesary and hopefully by the end of it have a clear path forward for… ROM6?

Cheers,
Ian

I haven’t investigated this fully yet, so I don’t have any API ideas. I need to spend more time thinking about it, maybe building a PoC quickly. In general, I hope to be able to leverage relations and commands in a way that would make caching work automatically, based on configuration. If it turns out not to be true, we will have to introduce explicit APIs for caching and invalidation.

If you’re interested in this feature, feel free to start experimenting already and I would love to know what you can come up with.

After a quick overview of the API, we can bikeshed it a bit if neccesary and hopefully by the end of it have a clear path forward for… ROM6?

I would say let’s introduce an experimental caching feature in ROM 5.x with the goal of having a stable solution for 6.0 :smile: