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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T16:47:03+00:00 2026-06-07T16:47:03+00:00

I’m just learning ASP.net and also making a web app for a friend in

  • 0

I’m just learning ASP.net and also making a web app for a friend in the same.

Now, in my app, there is a table that maps users to company’s branches, and another to map branches to clients. When the user logs in, I make fire a query to get a list of the branches he/she has access to, and then another one to get all the list of clients that he is responsible for. This happens a lot of times and is required on many pages.

Also, I’m using DevExpress’ GridView and GridViewLookUp tools. If you’re familiar with them, they are just like GridView in ASP.net and cause a postback each time the displayed entries are sorted or a different page is selected for viewing the entries. Basically, I want to to know that I have to fire the above two queries a lot of times.

There are on an average 100-150 clients that a user is usually responsible for.

So what I want to know is, for a number that high, should I retrieve all the client names and store them in a session so that I don’t have to connect to the database again as long as the user is logged in? Or should I just keep it the way it is and let it find clients every time from the database?

  • 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-07T16:47:04+00:00Added an answer on June 7, 2026 at 4:47 pm

    Since this data is specific for the Logged in user, you can keep it in the Session variable. Another alternate option is to implement a Cache layer in between your UI/Business logic and Data Access. Query it once a day (or your defined interval- cache duration) and keep it in the Cache. and next time when your UI requires it get it from there. If the data is null, that means cache is expired. Query it again and store it. Cache data is global to all users while session data is specific to that user session.

    If you have so many requests coming in, Keeping a copy of 150 client objects (how big it is ?) in session for each requests seems a little bad approach compared to keeping it in Cache. So i think You should go for Cache layer option.

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

Sidebar

Related Questions

That's pretty much it. I'm using Nokogiri to scrape a web page what has
I'm parsing an RSS feed that has an ’ in it. SimpleXML turns this
I have just tried to save a simple *.rtf file with some websites and
link Im having trouble converting the html entites into html characters, (&# 8217;) i
I have a jquery bug and I've been looking for hours now, I can't
I've got a string that has curly quotes in it. I'd like to replace
I have a string like this: La Torre Eiffel paragonata all’Everest What PHP function
this is what i have right now Drawing an RSS feed into the php,
I have a French site that I want to parse, but am running into
I am doing a simple coin flipping experiment for class that involves flipping a

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.