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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T23:12:11+00:00 2026-05-23T23:12:11+00:00

I have a simple web service which serves XML datasets (they can be as

  • 0

I have a simple web service which serves XML datasets (they can be as big as 250MB). This data comes from complex queries executed against a database. To speed up the service, I would like to cache the result of some of the queries. However I have a limited amount of RAM (~2GB). I don’t know in advance what the most requested XML dataset is. In addition, this can change over time (e.g. yesterday the dataset X is the most often requested, tomorrow it can be dataset Y).

I would like an “intelligent” cache algorithm which would cache the datasets which are the most likely to be requested. In this case, I cannot simply go with counters and cache the most often requested piece of data. I need some sort of time decay of the number of requests.

  • 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-23T23:12:11+00:00Added an answer on May 23, 2026 at 11:12 pm

    You can use LRU. Every time you access something not in the cache, replace the the thing is the cache used longest ago, and set its age to 0, incrementing all other ages. Every time you have a cache hit, reset the element’s age and increment all others. Can also be done by setting equal to current timestamp.

    Note: LRU is often used as an approximation of the optimal algorithm which requires oracular knowledge: replace the one which will be not be used for the longest time. LRU works well when locality is good, and does not suffer from Belady’s anomaly.

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

Sidebar

Related Questions

I have a simple web service operation like this one: [WebMethod] public string HelloWorld()
We have developed a RESTful web service which expects an XML string to arrive
I have a Web Service project and a WPF project (which serves as a
I have a web service project and simple test application. I can debug the
I have a simple WCF service which accept some data (wsHttpBiding) and returns a
Pretty simple scenario. I have a web service that receives a byte array that
I have a simple task. I have an existing project with a web service
While creating a simple client for a REST service which I have stubbed out,
I have developed a simple Apache-Axis java web service using Eclipse IDE and now
We have a simple WCF (on .NET 4.0) Service which uses Windows authentication and

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.