1. A controller for a hybrid memory comprising a main memory and a cache for the main memory, the controller comprising a hierarchy of abstraction layers each abstraction layer configured to provide at least one component of a cache management structure, each pair of abstraction layers comprising processors communicating through an application programming interface (API), the controller configured to receive incoming memory access requests from a host processor and to manage outgoing memory access requests routed to the cache using the plurality of abstraction layers.