Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8040759
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T04:00:19+00:00 2026-06-05T04:00:19+00:00

So right now I have come into a project that I’m taking over the

  • 0

So right now I have come into a project that I’m taking over the responsibility for.

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.

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.

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.

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.

How do you advice me to solve this interesting problem and why that way?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-05T04:00:21+00:00Added an answer on June 5, 2026 at 4:00 am

    Why not setup a cache cluster consisting out one or multiple servers, using one of the following caching technologies:

    • Windows Server AppFabric
    • NCache

    This way you don’t have to worry about running two services doing the same thing.

    Both these technologies support caching object for a specified about of time.

    E.g.:

    public void Add(string key, object value, TimeSpan timeout)
    {
        //...
    }
    

    Or you can choose to cache them indefinitely.

    Redudancy is supported. Be aware of the small print though.

    AppFabric Redundancy

    Back in 2010 I wrote some posts about AppFabric and NCache.

    • https://github.com/geersch/AppFabric
    • https://github.com/geersch/NCache

    Both provide an easy and similar API to work with.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a model that has one column right now, description , that populates
I have come across quite a wired problem right now. I am using ASP.NET
Right now I have these buttons that line up nicely, but they have some
Right now I have a tableview, and I can assure you that the delegate
I have come code that chains animations together (i.e. move left, then move right).
I am working on a project right now that involves receiving a message from
I am reading through a Learn C book right now and have come across
Good day! I right now have a function the drags an element from a
Right now I have to pull up Pending Changes window, right-click on the file
Right now I have some functionality working but its really ugly and I know

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.