lshift/diffa — pull request #154 by 0x6e6562 (2012-05-16 15:17:44+00:00)
Title: Caching provider abstraction to support caching of service limits

This patch consists of two broad areas:

* It introduces a cache provider abstraction and slots in (non-distributed) Hazelcast as an implementation;
* A functional caching facade has been built in front of the `HibernateServiceLimitsStore`. The goal of this is build a testable cache layer for a functional component that is independent of the caching provider and is not intertwined into the database access logic. Whilst involving a minimal amount of code duplication, this clearly defines the cache semantics as required by Diffa.

This is essentially just a technical patch ATM, since although the cache based ServiceLimitsStore is wired into the application context, there are no current users of the limiting framework as yet (mainly because we were waiting for caching to land before wiring it into other components).

In addition to the aforementioned changes, the `ServiceLimitsStore` has been refactored slightly to make the function arguments more consistent and to pull up pure functional code into the trait definition.