spray/spray — pull request #948 by kovacshuni (2014-10-11 14:27:28+00:00)
Title: + Cache is injectable now, with anyone's own store implementation.

Hello,

I needed spray-cache to be a bit more dynamic, have a **pluggable store for the cache**, not strictly a `ConcurrentLinkedHashMap`. I was thinking of Redis, but i thought let's make this generic and let anyone connect whatever database they want.

I kept the old `LruCace` object for backwards compatibility, however i don't like its behaviour: creating different types based on the duration arguments is not very *Clean Code*-like. Anyways, i added my separate `InjectedExpiringLruCache` and `InjectedSimpleLruCache` companion objects, and i'm open for your suggestions on how to set up the structure for these intantiaitons, as there is no perfect way.

Managed to pass the tests, needed just a small fix in *spray-routing tests*, adding `lazy` modifiers to two `val`s.

I'm hoping you'll find my feature useful. Would you mind reviewing this and letting me know your concerns if there are any? :)

Thank you very much,
Huni

(I've sent you a signed CLA in mail to your *info* username.)