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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T21:58:28+00:00 2026-06-12T21:58:28+00:00

I have created a webservice that delivers images. It will always be one-way communication.

  • 0

I have created a webservice that delivers images. It will always be one-way communication. The images will never be changed, on the side that gets them from the service.

It has multiple sources, and some can be far away, on bad connections.
I have created a memory cache for it, but I would like to also have a disc cache, to store images for longer periods.
I am a bit unsure on the best approach to do this.

First of all, all of my sources are webservers, so I don’t really know how to check the last modified date (as an example) of my images, which I would like to use, to see if the file has changed.

Second, how do I best store my local cache? Just drop the files in a folder and compare dates with the original source?
Or, perhaps store all the timestamps in a txt file, with all the images, to avoid checking files.
OR, maybe store them in a local SQL express DB?

The images, in general, are not very large. Most are around 200kb. Every now and then, however, there will be 7+ mb.
The big problem is, that some of the locations, where the service will be hosted, are on really bad connections, and they will need to use the same image, many times.
There are no real performance requirements, I just want to make it as responsive as possible, for the locations that have a horrible connection, to our central servers.

I can’t install any “real” cache systems. It has to be something I can handle in my code.

  • 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-12T21:58:29+00:00Added an answer on June 12, 2026 at 9:58 pm

    Why don’t you install a proxy server on your server, and access all the remote web-servers through that? The proxy server will take care of caching for you.

    EDIT: Since you can’t install anything and don’t have a database available, I’m afraid you’re stuck with implementing the disk cache yourself.

    The good news is – it’s relatively easy. You need to pick a folder and place your image files there. And you need a unique mapping between your image identification and a file name. If your image IDs are numbers, the mapping is very simple…

    When you receive a request for an image, first check for it on the disk. If it’s there, you have it already. If not , download it from the remote server and store it there, then serve it from there.

    You’ll need to take concurrent requests into account. Make sure writing the files to disk is a relatively brief process (you can write them once you finish downloading them). When you write the file to disk, make sure nobody can open it for reading, that way you avoid sending incomplete files.

    Now you just need to handle the case where the file isn’t in your cache, and two requests for it are received at once. If performance isn’t a real issue, just download it twice.

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

Sidebar

Related Questions

I have created one application in flex that is accessing the Java webservice using
I have created one web service that will may called from web using jQuery
I have created a function in PHP that calls a webservice and parses through
I have a Java RESTful webservice that will be called about every 10 seconds
I have a client for a 3rd party webservice that had to be created
I have created a webservice that can upload files to my sharepoint site library.
I have a selfhosted webservice ( WebServiceHost ) that also delivers html sites (with
I have created a console application that calls a method on a webservice. I
So I have an XSD and a webservice that delivers in that same format.
I have easily created a JSF project with NetBeans that delivers a web service

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.