Hii everyone , here you will get some information about always the question asked ' What is "Cache"' and it is safe to clear it..

Cache:

                               
                                Cache is simply a local database/object store where you can keep recently used objects that are not going to change and access them without going to the actual source. The goal is to speed up access and reduce load on the actual source if you want to read the access the object again for read only purpose. This is typically used by the processors to cache the instruction sets without needing to go to the main memory (which is slower) or browsers to cache static webpage that can served locally when needed.

                               Cache memory is typically placed in systems where there is a working set of data accessed far more often than the rest, so that the limited capacity of faster memory is best put to use by filling it with what is most frequently needed. The most common method of updating it is to cache a copy of accessed data when it is first read, and track the time it was last in use. When the cache runs full, new data begins to evict the data which has been sitting idle for the longest, so that if that's needed again, it will have to be fetched from large/slow storage again, too.



                                A cache is made up of a pool of entries. Each entry has associated data, which is a copy of the same data in some backing store. Each entry also has a tag, which specifies the identity of the data in the backing store of which the entry is a copy.

                               When the cache client (a CPU, web browser, operating system) needs to access data presumed to exist in the backing store, it first checks the cache. If an entry can be found with a tag matching that of the desired data, the data in the entry is used instead. This situation is known as a cache hit. So, for example, a web browser program might check its local cache on disk to see if it has a local copy of the contents of a web page at a particular URL. In this example, the URL is the tag, and the contents of the web page is the data. The percentage of accesses that result in cache hits is known as the hit rate or hit ratio of the cache.

Safe to Clear Cache Data??

                             When a device visits a website or uses an app, certain data is stored in the form of cache in the device memory. Next time when the device ... It is good to clear the system cache every now and then so that you can free up some space on your phone or tablet

Types of Caches..

 Hardware caches

CPU cache:

                             Small memories on or close to the CPU can operate faster than the much larger main memory. Most CPUs since the 1980s have used one or more caches, sometimes in cascaded levels; modern high-end embedded, desktop and server microprocessors may have as many as six types of cache (between levels and functions). Examples of caches with a specific function are the D-cache and I-cache and the translation lookaside buffer for the MMU.

GPU cache:

                            Earlier graphics processing units (GPUs) often had limited read-only texture caches, and introduced morton order swizzled textures to improve 2D cache coherency. Cache misses would drastically affect performance, e.g. if mipmapping was not used. Caching was important to leverage 32-bit (and wider) transfers for texture data that was often as little as 4 bits per pixel, indexed in complex patterns by arbitrary UV coordinates and perspective transformations in inverse texture mapping.

Software caches

Disk cache:

                         While CPU caches are generally managed entirely by hardware, a variety of software manages other caches. The page cache in main memory, which is an example of disk cache, is managed by the operating system kernel.

                         While the disk buffer, which is an integrated part of the hard disk drive, is sometimes misleadingly referred to as "disk cache", its main functions are write sequencing and read prefetching. Repeated cache hits are relatively rare, due to the small size of the buffer in comparison to the drive's capacity. However, high-end disk controllers often have their own on-board cache of the hard disk drive's data blocks.

Web cache:

                          Web browsers and web proxy servers employ web caches to store previous responses from web servers, such as web pages and images. Web caches reduce the amount of information that needs to be transmitted across the network, as information previously stored in the cache can often be re-used. This reduces bandwidth and processing requirements of the web server, and helps to improve responsiveness for users of the web.



Thanks for Reading..

by,
Chandrashekar yadav