title: Service layer, implement timed cache
body: <p>So right now I have come into a project that I'm taking over the responsibility for.</p>
  
  <p>One part I found that is halfway implemented is a service layer cache. Apparently this cache in the service layer was implemented to avoid a high amount of calls do the database cluster. The service layer is hosted on two servers for performance and stability if one server goes down.</p>
  
  <p>Now to my problem, or rather, what is the best pattern for the implementation of a timed cache? Objects that rarely changes or are updated, like countries etc are cached and never really released if not the pool is reset. </p>
  
  <p>Because we, or rather my predecessors, have two active services on two separate machines I'm thinking about implementing a timed cache. 
  An alternative could be to have the services talk with each others but of course taking into account that they are not dependent on each others so that if one goes down the other will work just fine.</p>
  
  <p>Right now there are 12 dictionaries with items that are cached. Most of these are rarely updated. These dictionaries resides in one class that is not a singleton but is implemented as a singleton so it is only instantiated once. </p>
  
  <p>How do you advice me to solve this interesting problem and why that way?</p>