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 7596367
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T21:54:07+00:00 2026-05-30T21:54:07+00:00

In a web application I invoke a web service to get metadata of documents

  • 0

In a web application I invoke a web service to get metadata of documents related to a specific client. This call might return a set of document records between 10 and 300.
I would like to store the retrieved data in a Dictionary (Key = docID – Value = metadata as complex class) and check first for the document ID into the Dictionary. Only if not found, then I would call the web service (and update then the dictionary).

How could I maintain that data structure within the users session?
Different users can access the application and request data about different (or same) clients. There will be max 40 users connected in the same moment.

How safe/performant would be to create a singleton class to manage this data structure? Moreover avoiding it will grow too much.

Does anyone know a good practice in this scenario?

  • 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-05-30T21:54:08+00:00Added an answer on May 30, 2026 at 9:54 pm

    I would use the Cache to store the Dictionary. The Cache is application-wide shared across all Sessions.

    if(Cache["Documents"] != null){
        var dict = (Dictionary<int,YourClass>)Cache["Documents"];
        if(!dict.ContainsKey(documentID)){
            dict.Add(documentID, yourComplexClass);
        }
    }else{
        var dict = new Dictionary<int,YourClass>();
        dict.Add(documentID, yourComplexClass);
        Cache.Insert("Documents", dict);
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have an application that makes a web service call to get the URL
I have a question. How can i invoke a web service and get the
I try to invoke a wcf web service in my MonoTouch application. On simulator
I am using the sample code to dynamically invoke a web service from this
In my web-application, I am contacting a Web-Service (using JAX-WS) but I get the
I have a web application uses a proxy to invoke an operation on a
Our web application sends e-mails. We have lots of users, and we get lots
My web application (MonoRail, Windsor, ActiveRecord) has a Startable import service and one or
I'm having a big problem when calling a web service from my WPF application.
I am trying to get the PowerBuilder 10.5.2 sample web services application running. I

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.