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

  • Home
  • SEARCH
  • 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 252363
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T21:40:18+00:00 2026-05-11T21:40:18+00:00

I want to cache data on the client. What is the best algorithm/data structure

  • 0

I want to cache data on the client. What is the best algorithm/data structure that can be employed?

Case 1. The data to be stored requires extremely fast string searching capability.
Case 2. The cached data set can be large. I don’t want to explode the client’s memory usage and also I don’t want to make a network and disk access calls which slows down my processing time on the client side

Solutions:

Case 1: I think suffix tree/Tries provides you with a good solution in this case.

Case 2: The two problems to consider here are:

  1. To store large data with minimum memory consumption
  2. Not to make any network calls to access any data which is not available in the cache.
    LRU caching model is one solution I can think of but that does not prevent me from bloating the memory.

Is there any way to write down to a file and access without compromising the data (security aspect)?

Let me know if any point is not clear.

EDIT:
Josh, I know my requirements are non-realistic. To narrow down my requirement, I am looking for something which stores using LRU algorithm. It will be good if we can have dynamic size configuration for this LRU with a maximum limit to it. This will reduce the number of calls going to the network/database and provide a good performance as well.

If this LRU algorithm works on a compressed data which can be interpreted with a slight overhead (but less than a network call), it will be much better.

  • 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-11T21:40:19+00:00Added an answer on May 11, 2026 at 9:40 pm

    Check out all the available caching frameworks/libraries – I’ve found Ehcache to be very useful. You can also have it keep just some (most recent) in memory and failover to disk at a specified memory usage. The disk calls will still be a lot faster then network calls and you avoid taking all the memory.

    Ehcache

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

Sidebar

Ask A Question

Stats

  • Questions 119k
  • Answers 119k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer I've tried it and have had excellent results against the… May 11, 2026 at 11:54 pm
  • Editorial Team
    Editorial Team added an answer I've run into this problem before, I had a scenario… May 11, 2026 at 11:54 pm
  • Editorial Team
    Editorial Team added an answer If you are using .NET 2 or above you can… May 11, 2026 at 11:54 pm

Related Questions

I have the 4 sources of IP addresses , I want to store them
i want to send the xml of an XmlDocument object to the HTTP client,
Do any of the currently popular browsers have particular problems caching* XMLHttpRequest responses that
A client has reported repeated instances of Very strange behaviour when executing a stored

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

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.