View Feed
group-icon
Coffee Room
Discuss anything here - everything that you wish to discuss with fellow engineers.
12939 Members
Join this group to post and comment.

What happens when CACHE memory is cleared?

actually what happens when cache memory is cleared?is it the unwanted or wasted memory or is it something else?
please explain in detail.
nishant arora
nishant arora • Jun 30, 2013
Cache just stores the data that you are likely to access frequently so as to avoid delays and the requested data can be served instantaneously. Its good to clear the cache memory once in a while to clear the memory.
Abhishek Rawal
Abhishek Rawal • Jun 30, 2013
Some CACHE memory you 'can' clear it & some "can't". It depends whether you're referring to CACHE in Hard-disk or CACHE memory in Processors.

CACHE memory you can clear is, CACHE memory in Hard-disk; which stores frequently used data for frequent access. CACHE memory in Hard-disk basically boosts the system as data is need not be re-fetched from original data everytime you use the specific frequently used data.
You can take example of Intel's Smart Response Technology to understand how it boosts the performance of a PC.

While CACHE memory in the processors (x86 & x64) is the special storage memory allocated within the die of processors which is very frequently used by processors to store the instructions which are accessed most.
You might be knowing that microprocessor performs sequentially,it means it fetches data then executes it, then goes to another address location,fetches data & executes it.This doesn't stop until the processor is asked to or some error in instruction is noted.
But, If in a processor an extra allocation of memory in processor's die itself is allocated then it fetches instruction & while executing the fetched instruction, it on the other end; is fetching other set of instruction, which means it is saving the processing time & hence processor's speed is increased.You don't always require board's system bus to perform the task & hence the improvement of speed is seen.

You might've noticed in the processor's configuration about cache something like 2MB L2 Cache, 4 MB L2 Cache ,etc. Here 2MB/4MB is size of cache memory & L1 & L2 is called Levels of closeness.
Latest processors have very large cache memory of upto 8MB to 16MB with 3 levels of closeness, as faster cores need to perform fast fetching & executing the instructions.

You might've question, what's "level of closeness" ?
L1,L2,L3 etc are level of closeness,L1 i.e Level-1 cache memory is built-in die of processor itself while Level-2 & Level-3 cache memory is on seperate part of board, not in CPU itself but it's faster to access than actual RAM.

However, certain latest assumptions says, it's not that always greater the cache size is greater the performance, & why is it so ? That's very deep technical debate.
suppose think that there is 10 Mb memory available and cache is 3Mb...if we clear that cache memory theoritically the available memory should be 13Mb...but if we see practically it is more than 13 Mb..why??
Abhishek Rawal
Abhishek Rawal • Jun 30, 2013
gwendollen
suppose think that there is 10 Mb memory available and cache is 3Mb...if we clear that cache memory theoritically the available memory should be 13Mb...but if we see practically it is more than 13 Mb..why??
I guess what's cache is still not clear for you.

Taking your own example,If 10 Mb is the total memory & 3Mb is Cache then 10-3=7 Mb user accessible memory,as 3 Mb is consumed by Cache.

So,If you clear the cache; It will be 10(total memory) - 3 (Cache) + 3 ( Cleared cache) = 10 Mb & not 10+3=13 Mb.
The original total size of memory doesn't increase if you clear the cache,only the memory is freed as you clear cache.

Again a small example might fix your query :
I have 10GB of Memory & 1GB is Cache, so I can use only 9GB as 1 GB is allocated by cache.If I clear cache,My memory will turn back to 10GB theoretically.
In practical approach you'll never get full legit 10GB (10x1024MB) as while performing/cleaning cache you are already performing task & cache is been created.
So,no matter how much you wipe cache,your memory will remain <10GB as per this example.
ok i think i understood what you said...
actually i got this doubt from using my android phone..
first its available memory shows me lets say 38Mb...and 2Mb cache...if i clear it then the available memory is shown as something like 42Mb...
i think you understood my doubt..please clear it for me..
nishant arora
nishant arora • Jul 1, 2013
I think there is more clogged memory than the system is displaying to you and thats why it shows 42mb after you clear it. Sometimes the system hogs more memory than required and that is why it is recommended that you clear the memory once in a while to speed things up.

Also what phone are you using? 42mb free memory is way too less. Upgrade now to a phone with at least a gig of memory! lol 😉
Sindhu Chowdary
Sindhu Chowdary • Jul 1, 2013
nishant arora
I think there is more clogged memory than the system is displaying to you and thats why it shows 42mb after you clear it. Sometimes the system hogs more memory than required and that is why it is recommended that you clear the memory once in a while to speed things up.

Also what phone are you using? 42mb free memory is way too less. Upgrade now to a phone with at least a gig of memory! lol 😉


do this clogging of memory occurs everytime???
and i got one more doubt cache is used to improve the speed of operation right...then why always clearing cache is suggested??
nishant arora
nishant arora • Jul 1, 2013
Memory clogging doesn't necessarily happen every single time. You could think of it as a bug that clogs up useful memory which your phone could use elsewhere performing important tasks and to run apps. This is why clearing of cache is suggested- To enjoy a lag free experience.
Jeffrey Arulraj
Jeffrey Arulraj • Jul 1, 2013
Cache clearing and also clearing the temporary files generated by the apps installed in your mobile is a periodic method to enhance your mobiles performance

Cos These files are not visible directly but occupy valuable memory

Share this content on your social channels -