The Random Access Memory (RAM) is a memory, where data used by the CPU are stored temporarly. As this memory provide much faster access than system hard disks, it makes the CPU accessing it much faster and is very important for system performance.
*What is memory cache?
The cache memory plays as a data interface between CP and RAM, because it is even faster than RAM memory. it synchronizes with the speed of the CPU, stores data and instructions more frequently accessed by the CPU reducing the amount of RAM accesses and increasing system speed.
There are 3 levels of cache memory to be considered.
Level 1 cache (L1): Stores and retrieve data (instruction register, program counter, address register, etc...) immediately manipulated by the CPU.
The Level 2 cache (L2): very fast memory with very fast access time storing data temporarily for fast access by the CPU.
The Level 3 cache (L3): Main memory where the system stores all the in-use data. It is a volatile memory so data doesn't persist on reboot.
*Why clearing the cache and RAM?
When processes uses data, they temorarly store them in RAM, making them quicker to access. This is a good thing since frequently accessed information can be quickly recalled.
The operating system owns directives to determine how long files cached will be keeped in memory, but Linux also gives the user the ability to clear the cache manually. You normally will never need to do this, although there are edge situations where it can come in handy, for example when your system run out of memory unexpectedly.
*What is PageCache?
PageCache stores the cached files that were recently accessed, for them not being queried from the hard disk again, unless that file changes or the cache is cleared.
*What are dentry, and inode cache?
Dentry and inode cache are directory and file attributes. This is complementary to PageCache. This cache also helps on reducing disk input and ouput operations.