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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T06:44:27+00:00 2026-05-28T06:44:27+00:00

What is best way to use the Caching library in performance view. I have

  • 0

What is best way to use the Caching library in performance view. I have a lot of data in my db tables that i want to cache.

Lets say i have 3 tables named.

  1. AssignmentHead
  2. AssignmentRow
  3. Items

Today iam storing the tables as fallows:

private CacheManager _manager = _manager = CacheFactory.GetCacheManager();

I’m having one CacheManger and i stores the data like this.

_manager.add("Heads",ListofAssignmentHeads);
_manager.add("Rows",ListofAssigmmentRows);
_manager.add("Items",ListOfItems);

When retrieving data like Heads i do fallowing:

_manager.GetData("Heads");

Then i’m getting a list of heads and using linq to query what i want. But is this the best way of doing this or is it better to set up 3 CacheManager for each table and insert the primary key and then the object.

_headManager.add("1",HeadObject);

I really need your advises on these one. Thanks for the help.

  • 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-28T06:44:28+00:00Added an answer on May 28, 2026 at 6:44 am

    Personally, all things being almost equal, I would cache the data in the format that I will need it at runtime. That way you can just get the information you need directly in the representation that you need. In your example that would be multiple CacheManagers with the primary key as the cache key.

    It looks like you already have methods that return the lists and you are caching the lists. I would rather iterate over the list once when the data is loaded and then perform a lookup by key than iterate the list on every call. If your lists are large you may see a performance hit if you have to search the lists for every request since finding the element in the list is O(N) vs. O(1) for a cache with no hash collisions.

    Of course, if you want to support dynamic lists then you might prefer to add lists as needed to a single CacheManager since creating dynamic CacheManagers is a bit of work.

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

Sidebar

Related Questions

I'm trying to find the best way to use Java libraries that were installed
What's the best way to design/use my model and NSFetchedResultsController so that I can
Possible Duplicate: Best way to use html5 data attributes with rails content_tag helper? How
What is the best way to use an embedded database, say sqlite in Python:
what is best way to use logger in JSF application
I'm curious as to the best way to use the relatively new pushState feature
I was wondering what the best way to use transations with the entity framework.
I'm looking for the best way to use a duration field in a Rails
I am investigating since a few hours the best way to use the Email
I'm just wondering if what is the best way to use BitmapFactory ? I'm

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.