I'm sure many of us have seen '301 views', on youtube before, or where someone comments on a video and seems to know the exact count where the view count has got stuck. Ever wonder why that seems to happen?
The easiest way to explain cache is like this.
You have your teacher, a student and a parent.
The parent asks the student what did he learn at school today, and he can tell the parent. This is like loading a file off a server. Now, the student knows must of the things but not all of them.
So, the parent asks the student when the next test will be, the student the asks the teacher, the teacher tells the student and then tells his parent.
Now for a second, with out caching, every time the parent asked when the test was the student would have to go ask the teacher...this would be a fairly lengthy process even if the student was at school.
So the teacher says, hey, bugger off remember that the test is on the 30th...
So every time the parent asks now he says its the 30th, even tho in reality the school board might have said OH HOLD ON you cant have the test on the 30th of april were going to have a fire drill then. So a few weeks later (in youtube its about 30 minutes) the teacher goes to the student and is like, HEYHEYHEY sorry about that, not the 30th it'll be the 29th.
This also effects many sites, like facebook where it tells you you have a comment on your status, but you view it and there is no comment there. That is because your status place holder is working like a student who has been told there is no comments, and is waiting for the teacher to update him. (but the status at the top is like talking to the teacher directly on the phone) So the teacher tells you there is a test on the 29th but you go and ask your kid, and he still doesn't know yet and gives you a blank stair.
The easiest way to explain cache is like this.
You have your teacher, a student and a parent.
The parent asks the student what did he learn at school today, and he can tell the parent. This is like loading a file off a server. Now, the student knows must of the things but not all of them.
So, the parent asks the student when the next test will be, the student the asks the teacher, the teacher tells the student and then tells his parent.
Now for a second, with out caching, every time the parent asked when the test was the student would have to go ask the teacher...this would be a fairly lengthy process even if the student was at school.
So the teacher says, hey, bugger off remember that the test is on the 30th...
So every time the parent asks now he says its the 30th, even tho in reality the school board might have said OH HOLD ON you cant have the test on the 30th of april were going to have a fire drill then. So a few weeks later (in youtube its about 30 minutes) the teacher goes to the student and is like, HEYHEYHEY sorry about that, not the 30th it'll be the 29th.
This also effects many sites, like facebook where it tells you you have a comment on your status, but you view it and there is no comment there. That is because your status place holder is working like a student who has been told there is no comments, and is waiting for the teacher to update him. (but the status at the top is like talking to the teacher directly on the phone) So the teacher tells you there is a test on the 29th but you go and ask your kid, and he still doesn't know yet and gives you a blank stair.
you're probably a 511s or 510s man though.