CACHE memory/consistency problem

kshireesh used Ask the Experts™
we already know that a client cache manager knows if a file in its cache is still up to date. the method suggest was to contact the server and have the server compare the client and server times.

SO my question is :

Does this method fail if the client and server clocks are very different?
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
I am at a loss to understand your context. Only adding here since I see no comments for days.

Caching can be for parts of a file.
Caching can be for parts of program.
Caching can be for parts of web services, such as for page.

A file comparison can include date, time, (modified? or created?), CRC, size, checksum, etc.

Since you have selected "time" as criteria, then for this:

> "Does this method fail if the client and server clocks are very different?"

The answer is: "Of Course!"

Every second can count, and how time is computed and stored can be at issue, hence an overall reliance on Greenwich time (standard). Get them synchronized. So yes, this not only can, but it does break. Even on leap-years still. But it does not have to. All's that is needed, (where authorized) is to have both refer to same datum, not to clocks at all.

a) server has file with datestamp
b) client asks what is the datestamp
c) server tells client the datestamp
d) client remembers the datestamp it was told

This method is only about recordkeeping. So there are no clocks involved at all (other than remote inference). So for question of:

> "Does this method fail if the client and server clocks are very different?"

Answer = No. No clocks are involved.

c1) client can compare datestamp it was just told, with the one it has recorded previously


b1) server compares datestamp of client record with its own, and takes action accordingly

Clocks not used in process. Note that none of datestamps concerning files were ever created by client. And I make no claim either for server times, the file(s) could have been prepared by a third party. And it could be the 3rd party clock is only issue, for being synchronized well with anything.

No comment has been added lately, so it's time to clean up this TA.
I will leave a recommendation in the Cleanup topic area that this question is to:

Accept SunBow's comments as answer

Please leave any comments here within the next seven days.
EE Cleanup Volunteer
Per recommendation.

EE Moderator

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial