What Is My Cache Worth?

If you’ve ever been online, which I know you have since your reading this post, I know you must have come across and heard the term cache, but do we even know what it is? Let alone how do you even pronounce this weird word?

If you ever thought this same thing like me then welcome aboard. We are going to explore the wonderful world of caching.

So today we will find out…

  • What is it?
  • How do you pronounce it, because you don’t want to sound like a noob especially if your learning all about web development
  • How does it work?
  • and The Benefits?

What is Cache?

So what is Cache, well let’s first get this confusing subject out the way and get the right pronunciation of this term first.

I thought it was cool when I found out how its said and it actually helps me to remember how to say it. “Cache” is actually pronounced like “CASH”.

So get your cash up homie lol. Pretty simple right?

That’s something we can all remember, I know I won’t ever forget.

But then does it take your money or let alone make money?

Sorry, but it has nothing to do with money, well not physically per say.

What cache is in an temporary storage system for files you access from a website.

So to put it plainly, think of files you saved on your local computer hard drive, cache acts that same way but through your browser and only temporarily.

You can also think of it as “catching” those files, then when your done it throws them back– most times.

So maybe this phrase might help you to remember…

The Cash catches your files.

Pretty catchy huh  : ) I thought of this all by myself.

Now you know how to pronounce this new term and what its true purpose is for, but then the question to ask now is…

How Does it Work?

This is a great question, how exactly does cache store your data to the browser or through the browser. Welcome to the world of algorithms. Here’s another term we need to dive a little deeper on, but for now well go over the basics.

Algorithms

Algorithms give instructions on how the cache should be maintained.

What does that even mean exactly?

If you ever written Javascript, because you might be learning to be a front end developer like myself, let’s think of this as an “if else conditional statement”.

In other words “If” this particular statement or condition is true, then it will produce this result, “else” if the condition is false it produces another out come.

Basic input and output functions right? I mean I think, I could be wrong thinking emoji . Hey I’m still learning this game of web dev. Sounds about right though.

Moving on,

Once these conditions are met the function is produced.

3 examples of cache algorithms are as follows…

  1. LFU: Least Frequently Used–This algorithm uses a counter to track the amount of times an entry to a website is accessed.  The Site with the least count will be removed first.
  2. LRU: Least Recently Used– This algorithm keeps track of the recent sites near the top. The sites that have been seldomly visited or accessed are removed.
  3. MRU: Most Recently Used– this one sounds like a medical term lol, but this algorithm removes the most recently used sites first.

This last one is a little confusing so let me try to explain that…MRU works a little backwards. The least accessed site is more likely to be accessed before the most recently used. Therefore it will get rid of of this first.

Idk it still seems a little backwards, and somewhat inefficient. However this just tells me there might be another article on algorithms, specifically MRUs. Who knows maybe I’ll get a degree in MRU or maybe from MRU lol jk.

Let’s process through this again though.

When you visit a website the files that the data is stored on is now stored to a local folder through the browser. this can lead to many ramifications as it will cycle through these algorithms.

What does this mean for you or the visitor?

The Benefits.

What happens when files are temporarily downloaded to a local folder through your internet browser?

Well one of the benefits is…

Improvement on performance.

How? since the site has already been temporarily downloaded there is no need for it to do it again. Thus it is able to access the files faster which creates faster load time. Especially when you try to access the visited site again the only thing that will need downloading is any new content that has been updated.

In other words, faster load times.

Honestly that is the main benefit of caching. So the title should be “THE” benefit rather than benefits, which it could mean for you since you can have a better web experience as you navigate through different pages.

On thing you should be aware though, the cache can get full and may need some attention and cleared once in awhile if you see your browser acting up or not loading properly it might be due to the cache.

Another warning is you may be susceptible to hacking especially if you are on a shared network like at work and someone gains access to your computer. Because of the cache they can easily gain access to some possible confidential info.

Just be weary when you allow certain sites to be cached.

That about wraps the cache lol, sorry I couldn’t resist.

But seriously now you know what is cache, how you pronounce it, “cash”, how it works,  the benefit, and I even gave some bonus material of being aware of your cache.

 

 

 

Pin
Share